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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This can be achieved with DotNetNuke Professional edition using the extended granular permissions.
回答2:
Or by using Oliver Hine's Enhanced Permission Provider for DotNetNuke.
回答3:
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