[英]How to assign Pages to User Roles in Membership and Roles by Custom Asp.net Page
I am creating a web application and i have already created page for creating Roles. 我正在创建一个Web应用程序,并且已经创建了用于创建角色的页面。 but i want that admin should decide in which roles which are the pages or modules that role is authenticated to.
但我希望该管理员应确定要对哪个角色进行身份验证的页面或模块。 I am using built in Membership and Roles.
我正在使用内置的成员资格和角色。
For Menus i am using Sitemap for security Trimming it is working fine. 对于菜单,我正在使用Sitemap进行安全修整,效果很好。 i just want to make that thing customizable.
我只想使该东西可定制。
I have the option to hard code in web.config but i want to make it customizable. 我可以选择在web.config中进行硬编码,但我想使其可自定义。
<location path="Upload.aspx">
<system.web>
<authorization>
<allow roles="Uploader"/>
<deny users="*" />
</authorization>
</system.web>
</location>
Is there any way that we can make this customizable ? 有什么方法可以使此自定义?
Checkout the open source Web based Web Site Administration tool from UDRI: http://udriwsat.codeplex.com/ 从UDRI中检出基于Web的开放源代码Web站点管理工具: http ://udriwsat.codeplex.com/
I believe they've got rules like that already built in. 我相信他们已经建立了类似的规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.