查询应页面的权限
authorizedactions
8 更正
4 更新/全部显示
2 更新/显示
1 添加
displayonly
1 只显示
0 可编辑
许可权列表页面权限:
SELECT OU.CLASSID AS 许可权列表,
MI.ITEMLABEL as 组件,
CO.ITEMLABEL as 页面,
case OU.DISPLAYONLY when 1 then '只显示' when 0 then '可编辑' end,
ou.authorizedactions,
ou.*,
MI.*
FROM PSAUTHITEM OU, PSMENUITEM MI, PSPNLGROUP CO
WHERE OU.CLASSID = '许可权列表'
AND OU.MENUNAME = MI.MENUNAME
AND OU.BARNAME = MI.BARNAME
AND OU.BARITEMNAME = MI.ITEMNAME
AND MI.PNLGRPNAME = CO.PNLGRPNAME(+)
AND OU.PNLITEMNAME = CO.ITEMNAME(+)
AND OU.BARITEMNAME <> '%TEST%'
ORDER BY MI.ITEMLABEL
________________查询哪些用户对组件页面的权限--------------------------------------------------------------------------------
SELECT DISTINCT U.ROLEUSER,p.oprdefndesc,
MI.ITEMLABEL as 组件,
CO.ITEMLABEL as 页面,
case OU.DISPLAYONLY when 1 then '只显示' when 0 then '可编辑' end/*,
ou.authorizedactions,
ou.*,
MI.*
*/
FROM PSAUTHITEM OU, PSOPRDEFN P,PSROLEUSER U ,PSROLECLASS R ,PSMENUITEM MI, PSPNLGROUP CO
WHERE OU.MENUNAME = MI.MENUNAME
AND OU.BARNAME = MI.BARNAME
AND OU.BARITEMNAME = MI.ITEMNAME
AND MI.PNLGRPNAME = CO.PNLGRPNAME(+)
AND OU.PNLITEMNAME = CO.ITEMNAME(+)
AND OU.BARITEMNAME <> '%TEST%'
AND OU.BARITEMNAME='JOB_DATA'
AND R.ROLENAME=U.ROLENAME AND R.CLASSID=OU.CLASSID
AND P.OPRID=U.ROLEUSER
AND P.ACCTLOCK=0
ORDER BY 1;
----------------------------用户对应的页面权限----------------------------------------------------------------------------------------------
SELECT DISTINCT A.MENUNAME, A.BARITEMNAME,C.PNLGRPNAME, C.ITEMNAME, C.ITEMLABEL,a.displayonly,a.authorizedactions
FROM PSAUTHITEM A, PSPNLGROUP C, PSROLECLASS R ,psroledefn ro
WHERE A.PNLITEMNAME = C.Itemname(+)
AND A.PNLITEMNAME = C.PNLGRPNAME(+)
and r.rolename = ro.rolename
AND R.CLASSID(+) = A.CLASSID
and exists (select 1 from psroleuser t where t.rolename=r.rolename and t.roleuser='userid')
ORDER BY A.MENUNAME, A.BARITEMNAME
;