-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement]: More detailed permissions #6042
Comments
See also blog post https://2sxc.org/en/blog/post/hidden-dnn-gem-detailed-permissions |
AdvancedPermissionProvider implemented backend support for advanced roles, specifically Content Editors and Content Managers. The feature inherited from the existing PermissionProvider, ensuring compatibility and leveraging current functionalities to offer a comprehensive solution for managing detailed permissions. |
@tvatavuk the commit tvatavuk@2a887bd still seems to call it |
Is there an existing issue for this?
Description of problem
Core page permissions are "VIEW" and "EDIT". This is adequate for basic websites, but for any more significant implementation, we need to provide page permissions at a more detailed level. We need separate page permissions for adding new pages, editing existing pages, deleting, copying, exporting, importing, managing settings, etc.
Description of solution
CorePermissionProvider in DNN Platform inherits PermissionProvider, which already has a significant amount of code supporting and handling detailed permissions.
After reviewing the PermissionProvider code, it looks like most of the functionality is already present, with the missing part related to setup, configuration, and UI exposure.
For configuration, we can create a new DetailedPermissionProvider that will also inherit PermissionProvider and adjust detailed permissions for use in the DNN Platform.
This can be configured in the usual way in web.config.
The first part is to find the correct permission keys that will function as required with the existing code in the DNN Platform. Based on existing constant names and after a detailed code review and testing, here are the suggested permission keys:
To expose these detailed permissions in the DNN Platform UI and else, it is necessary to correctly populate the Permission table. Again based on existing values, with little guessing and after some testing I find that following values could work. For [PermissionCode] column values,
SYSTEM_FOLDER
is for Folder Permissions,SYSTEM_MODULE_DEFINITION
is for Module Permissions, andSYSTEM_TAB
is for Page Permissions. The [ModuleDefID] value is-1
, and the [PermissionKey] uses the exact permission key constant from the C# code. The [PermissionName] value is based on the PermissionKey. Every other column values are common for DNN Platform, not very significant and are easy to populate.It looks that this is all necessary to expose detailed permissions to end users in the DNN Platform.
Description of alternatives considered
DetailedPermissionProvider can be packaged as a DNN Extension and installed as any other addon.
Anything else?
No response
Do you be plan to contribute code for this enhancement?
Would you be interested in sponsoring this enhancement?
Code of Conduct
The text was updated successfully, but these errors were encountered: