积极答复者
asp.net 角色权限的问题

问题
答案
-
字段?ASP.net里面没这东西。
你需要在数据访问层或者业务逻辑层就做好权限设计,比如在业务逻辑层读取你自己的权限表再在访问之前检查授权,然后再写一个membership provider和ASP.net的权限系统整合。默认的membership provider没有基于字段的授权。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 KeFang Chen 2010年7月2日 3:55
-
你好,
如果你是说ASP.NET中角色,那是你在登录的时候设定的。数据库中有一个存储用户角色的字段,当用户登录的时候根据该字段分配角色。
至于怎么分配可以参考下面这个帖子。http://social.microsoft.com/Forums/zh-CN/295/thread/e002d8a0-6f94-4164-b540-86b2b997aa69
对于权限更改你可以把每一类角色所能进行操作的项存在表里面,如果某一类角色没有权限操作则根本不显示在页面上。
Microsoft Online Community Support- 已标记为答案 KeFang Chen 2010年7月2日 3:55
全部回复
-
字段?ASP.net里面没这东西。
你需要在数据访问层或者业务逻辑层就做好权限设计,比如在业务逻辑层读取你自己的权限表再在访问之前检查授权,然后再写一个membership provider和ASP.net的权限系统整合。默认的membership provider没有基于字段的授权。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 KeFang Chen 2010年7月2日 3:55
-
你好,
如果你是说ASP.NET中角色,那是你在登录的时候设定的。数据库中有一个存储用户角色的字段,当用户登录的时候根据该字段分配角色。
至于怎么分配可以参考下面这个帖子。http://social.microsoft.com/Forums/zh-CN/295/thread/e002d8a0-6f94-4164-b540-86b2b997aa69
对于权限更改你可以把每一类角色所能进行操作的项存在表里面,如果某一类角色没有权限操作则根本不显示在页面上。
Microsoft Online Community Support- 已标记为答案 KeFang Chen 2010年7月2日 3:55