Mahogany
Mahogany

Reputation: 493

DNN - Allow users to edit content but not settings

I'd like "Content Managers" of my DNN website to edit just the content of a particular HTML module instance, but not its settings. How do I achieve this? If I allow this role to "Edit" the module, they are able to access and change the module settings as well. Thanks in advance for your inputs.

Upvotes: 3

Views: 917

Answers (3)

noonecares
noonecares

Reputation: 216

you can achive this by adding your own its called "custom permission" to a module. (I can show you how you will achive this if you are interrested) If you do this you will see in the settings of the module after the "edit" column of the permission section your custom created permission. In your code you can then check if the current logged in user has got this permission and react making grids editable or not for example.

//get the moduleconfiguration
ModuleInfo conf = this.ModuleConfiguration;
ModulePermissionCollection myPermissionCollection = ModuleConfiguration.ModulePermissions;
//read out the custom data editright of the global constant
bool bCustomEditDataRights = ModulePermissionController.HasModulePermission(myPermissionCollection, "MyCustomPermission");

Hope this helps. best regards, noone

Upvotes: 0

Mahogany
Mahogany

Reputation: 493

Or by using Oliver Hine's Enhanced Permission Provider for DotNetNuke.

Upvotes: 0

Chris Hammond
Chris Hammond

Reputation: 8943

This can be achieved with DotNetNuke Professional edition using the extended granular permissions.

Upvotes: 1

Related Questions