http://hi.baidu.com/yinhaiming/blog/item/8926d7bfc158140f18d81f39.html
http://blog.csdn.net/adandelion/articles/464574.aspx
http://blog.csdn.net/adandelion/articles/464573.aspx
http://blog.csdn.net/adandelion/articles/464570.aspx
可以从下面5个方面设计你的系统:
Who:权限的拥用者或主体(Principal、User、Group、Role、Actor等等)
What:权限针对的对象或资源(Resource、Class)。
How:具体的权限(Privilege)。
Role:是角色,拥有一定数量的权限。
Operator:操作。表明对What的How 操作。
具体:
Who: 用户 对应表 UserBaseInfo
Role:角色 对应表 Roles
What: 目录 对应表 Function
How: 权限 1,2,3,4 对应:浏览 增加 修改 删除
关系表: UserRole 用户角色对应表
关系表: RoleRights 角色模块对应表 How关系放在该表RightFlag字段中
角色登陆时检索 RoleRights 中的所有RlghtFlag 字段 保存到Arralist中->Session
当然还有很多前期工作要做
首先要给各个模块(目录)编号 。。。
User.IsInRole("admin")
这个可以判断当前用户是否属于admin角色组...可以根据这样的判断分配用户不同的权限..
一个用户可以属于不同的角色..
if (User.IsInRole("admin") && User.IsInRole("user"))这样也可以的.
User.Identity.Name
获取用户的名称..
http://baikaiyun.blog.hexun.com/16531813_d.html
http://kmyhy.spaces.live.com/blog/cns!560CAB75B2BF187B!107.entry
http://www.cnblogs.com/whitetiger/archive/2008/02/22/1077583.html
http://hi.baidu.com/freezesoul/blog/item/6e23dec45b1e93cf38db4971.html
http://www.dedecms.com/plus/view.php?aid=21641
http://hi.baidu.com/zhaochunyu0104/blog/item/d76dc2ea015d81d7d439c914.html
http://blog.csdn.net/manimanihome/archive/2008/01/02/2010108.aspx
http://www.cnblogs.com/liweibird/articles/636235.html
http://www.cnblogs.com/yukaizhao/archive/2007/04/15/714256.html
http://www.blueidea.com/tech/program/2007/4676_2.asp
http://lovecherry.cnblogs.com/archive/2005/12/05/291092.html