table user 用户表
userid
usernamerole 角色表
roleid
rolenameuser_role 用户+角色表关系
userid
roleidfun 功能表也叫权限表
funid
funnamefun_role 权限和角色表关系
funid;
roleid;要查询一个用户有哪些角色
select * from user_role where userid ='';
查询'jason'有哪些角色
select * from t_role where roleid in(select roleid from t_user_role where userid =(select userid from t_user where username='jason'))
查询'jason'有哪写功能操作.
select * from t_function where funid in(select funid from t_function_role where roleid in ( select roleid from t_user_role where userid =01)).我目前只能想到这些功能了,请大家看看能够否满足目前J2EE系统里的多角色权限问题,也请大家多多指教.
userid
usernamerole 角色表
roleid
rolenameuser_role 用户+角色表关系
userid
roleidfun 功能表也叫权限表
funid
funnamefun_role 权限和角色表关系
funid;
roleid;要查询一个用户有哪些角色
select * from user_role where userid ='';
查询'jason'有哪些角色
select * from t_role where roleid in(select roleid from t_user_role where userid =(select userid from t_user where username='jason'))
查询'jason'有哪写功能操作.
select * from t_function where funid in(select funid from t_function_role where roleid in ( select roleid from t_user_role where userid =01)).我目前只能想到这些功能了,请大家看看能够否满足目前J2EE系统里的多角色权限问题,也请大家多多指教.
解决方案 »
- 请问ssh中如何避免Action不存在的地址请求报错
- 请教关于WADL的问题。
- JEECMS部署到myeclipse时500错误
- 求助啊(尤其懂管理的一定要来帮帮我吧)
- 用什么调试JSP程序最好
- 自定义标签的多次使用的问题
- Red linux+Oracle 9iAS for linux+java应用程序
- 要调用这个servlet,在tomcat5.0中要做那些设置(附代码)?
- 请教关于struts的问题?
- 一对多的单向关联中,“一”的一端删除时怎么把多的一端也删除了(多的一端关联,一的一端没关联)?
- struts2 Annotation 用过的进
- 部署项目后启动tomcat报错 Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]:
---------------------
用户 与 角色 多对多
用户 与 组 多对多
角色 与 组 多对多