DNN - Allow users to edit content but not settings

2019-07-04 04:47发布

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.

3条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-07-04 05:11

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

查看更多
再贱就再见
3楼-- · 2019-07-04 05:18

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

查看更多
神经病院院长
4楼-- · 2019-07-04 05:23

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

查看更多
登录 后发表回答