2011-10-19 125 views
3

我希望我的DNN網站的「內容管理者」只編輯特定HTML模塊實例的內容,但不編輯它的設置。我如何實現這一目標?如果我允許此角色「編輯」模塊,則他們也可以訪問和更改模塊設置。 預先感謝您的意見。DNN - 允許用戶編輯內容但不設置

回答

0

或者通過使用Oliver Hine的增強許可提供商爲DotNetNuke。

1

這可以通過使用擴展粒度權限的DotNetNuke專業版來實現。

0

您可以通過將自己的「自定義權限」添加到模塊來實現此目的。 (我可以告訴你,如果你被捕獲,你將如何實現這一點) 如果你這樣做,你會在權限部分的「編輯」欄之後的模塊設置中看到你的自定義創建的權限。 在您的代碼中,您可以檢查當前登錄的用戶是否已獲得此權限並對網格進行編輯或修改。

//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"); 

希望這有助於。 最好的問候,沒有人