OpenJWeb快速开发平台组织结构继承权限的实现
2009-03-11 11:05
465 查看
OpenJWeb快速开发平台中实现了上级组织结构下的人员可获得下级组织结构的权限,sql:
create or replace view v_user_auth as
--select distinct user_id,login_id,comm_code,auth_name,auth_resource from (
select a.user_id,a.login_id,b.comm_code,b.auth_name,b.auth_resource from
comm_user a,comm_auth b ,comm_user_auth c
where c.user_id = a.user_id
and c.auth_id = b.auth_id
union
select a.user_id,a.login_id,b.comm_code,b.auth_name,b.auth_resource from
comm_user a,comm_auth b , comm_user_role d,comm_role_auth e
where a.user_id = d.user_id
and d.role_id = e.role_id
and e.auth_id = b.auth_id
union
select a.user_id,a.login_id,b.comm_code,b.auth_name,b.auth_resource from (
select a.user_id,a.login_id,b.row_id row_id,b.tree_code from comm_user a,comm_dept b where a.dept_id=b.pk_id union
select a.user_id,c.login_id,a.org_id row_id,b.tree_code from comm_org_emp_rel a,comm_dept b,comm_user c where b.row_id = a.org_id and c.dept_id=b.pk_id) a,
(
select a.dept_id,c.auth_id,b.tree_code,c.comm_code ,c.auth_name,c.auth_resource from comm_dept_auth a,comm_dept b,comm_auth c where a.dept_id =b.row_id
and a.auth_id=c.auth_id) b
where b.tree_code like a.tree_code ||'%' ;
例如下级组织结构001001具有某功能的权限,则上级组织结构001则可获得此功能的权限,如果用户A属于001部门,则
此用户可获得分配给001001组织的权限.使用spring security框架可以从这个视图中获取权限记录.
create or replace view v_user_auth as
--select distinct user_id,login_id,comm_code,auth_name,auth_resource from (
select a.user_id,a.login_id,b.comm_code,b.auth_name,b.auth_resource from
comm_user a,comm_auth b ,comm_user_auth c
where c.user_id = a.user_id
and c.auth_id = b.auth_id
union
select a.user_id,a.login_id,b.comm_code,b.auth_name,b.auth_resource from
comm_user a,comm_auth b , comm_user_role d,comm_role_auth e
where a.user_id = d.user_id
and d.role_id = e.role_id
and e.auth_id = b.auth_id
union
select a.user_id,a.login_id,b.comm_code,b.auth_name,b.auth_resource from (
select a.user_id,a.login_id,b.row_id row_id,b.tree_code from comm_user a,comm_dept b where a.dept_id=b.pk_id union
select a.user_id,c.login_id,a.org_id row_id,b.tree_code from comm_org_emp_rel a,comm_dept b,comm_user c where b.row_id = a.org_id and c.dept_id=b.pk_id) a,
(
select a.dept_id,c.auth_id,b.tree_code,c.comm_code ,c.auth_name,c.auth_resource from comm_dept_auth a,comm_dept b,comm_auth c where a.dept_id =b.row_id
and a.auth_id=c.auth_id) b
where b.tree_code like a.tree_code ||'%' ;
例如下级组织结构001001具有某功能的权限,则上级组织结构001则可获得此功能的权限,如果用户A属于001部门,则
此用户可获得分配给001001组织的权限.使用spring security框架可以从这个视图中获取权限记录.
相关文章推荐
- OpenJWeb快速开发平台组织结构继承权限的实现
- OpenJWeb快速开发平台组织结构权限继承变更说明
- OpenJWeb快速开发平台组织结构权限继承变更说明
- C#.NET 大型通用信息化系统集成快速开发平台 4.0 版本 - 省市区数据权限的实现效果
- OpenJWeb快速开发平台使用struts2实现多语切换的方法
- C#.NET 大型通用信息化系统集成快速开发平台 4.0 版本 - 用户权限树的实现 -- 权限递归树
- OpenJWeb快速开发平台使用struts2实现多语切换的方法
- OpenJWeb快速开发平台自动创建基于事务的业务逻辑接口和实现类
- OpenJWeb快速开发平台自动创建基于事务的业务逻辑接口和实现类
- OPenJWeb快速开发平台中的简易审批流的实现
- OPenJWeb快速开发平台中的简易审批流的实现
- SpringBird Erp系统快速开发平台(组织机构,权限管理)、代码生成器、消息中间件免费下载
- OpenJWeb快速开发平台-内容管理系统(CMS)
- OpenJWeb 1.6 快速开发平台功能介绍
- OpenJweb快速开发平台字段默认值生成器
- 快速开发平台之公文签章、自定义报表的实现
- .Net语言 APP开发平台——Smobiler学习日志:如何快速实现地图定位时的地点微调功能
- .Net语言 APP开发平台——Smobiler学习日志:如何快速实现快递信息流的效果
- .Net语言 APP开发平台——Smobiler学习日志:Poplist控件的正确打开方式以及如何快速实现
- .Net语言 APP开发平台——Smobiler学习日志:在手机应用开发中如何快速实现应用间的分享功能