OpenJWeb快速开发平台组织结构继承权限的实现

系统 1608 0

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框架可以从这个视图中获取权限记录.

OpenJWeb快速开发平台组织结构继承权限的实现


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论