cap*_*lam 2 c# asp.net permissions orchardcms
所以我创建了我的第一个Orchard模块,它基本上只是管理面板中的一个CRUD,前端表单可供公众使用.现在,我需要在管理面板中为不同的用户角色提供不同级别的访问权限.我已经创建了"admin"用户,但现在我遇到了较少的privlidged用户,他们只能查看记录的子集.
问题是我没有IDEA从哪里开始.我很高兴在我的列表屏幕上说:if (UserRole == "SomeRestrictedRole") Select.Where("however we restrict");- 但我不知道如何访问UserRole(我也是.NET MVC的新手).
我认为PROPER解决方案是扩展IPermissions或类似的东西?但同样,我找不到任何教程或文档指出我正确的方向.
这是我到目前为止阅读的文档:
http://docs.orchardproject.net/Documentation/Creating-a-module-with-a-simple-text-editor
http://docs.orchardproject.net/Documentation/Understanding-data-access
http://docs.orchardproject.net/Documentation/Managing-users-and-roles
http://docs.orchardproject.net/Documentation/Understanding-permissions
任何建议将不胜感激!
| 归档时间: |
|
| 查看次数: |
3202 次 |
| 最近记录: |