1. Pages that could be accessed by a specific permission list.
SELECT b.menuname, b.barname, b.baritemname, b.pnlitemname AS pagename,
c.pageaccessdescr,
DECODE (b.displayonly, 0, 'No', 1, 'Yes') AS displayonly
FROM psclassdefn a, psauthitem b, pspgeaccessdesc c
WHERE a.classid = b.classid
AND a.classid = :1
AND b.baritemname > ' '
AND b.authorizedactions = c.authorizedactions;
2. All peopletools objects (Query, Application Designer, Data Mover) that a specific permission list could access.
SELECT DISTINCT b.menuname
FROM psclassdefn a, psauthitem b
WHERE a.classid = b.classid
AND ( b.menuname = 'CLIENTPROCESS'
OR b.menuname = 'DATA_MOVER'
OR b.menuname = 'IMPORT_MANAGER'
OR b.menuname = 'APPLICATION_DESIGNER'
OR b.menuname = 'OBJECT_SECURITY'
OR b.menuname = 'QUERY'
)
AND a.classid = :PermissionList;
3. Content References accessed by a specific Permission List.
SELECT a.portal_label AS PORTAL_LINK_NAME, a.portal_objname, a.portal_name, a.portal_reftype
FROM psprsmdefn a, psprsmperm b, psclassdefn c
WHERE a.portal_reftype = 'C'
AND a.portal_cref_usgt = 'TARG'
AND a.portal_name = b.portal_name
AND a.portal_reftype = b.portal_reftype
AND a.portal_objname = b.portal_objname
AND c.classid = b.portal_permname
AND a.portal_uri_seg1 <> ' '
AND a.portal_uri_seg2 <> ' '
AND a.portal_uri_seg3 <> ' '
AND c.classid = :permissionlist
AND a.portal_name = :portalname
ORDER BY portal_label;
We are only interested in translate value of 'TARG' (target) from field portal_cref_usgt on table psprsmdefn. Other available translates on that field are:
FRMT = Frame template
HPGC = Pagelet
HPGT = Homepage tab
HTMT = HTML template
LINK = Content Reference Link
It is important to note that knowing the content reference will make it easy to find the path (PIA navigation) for that content ref. Here is a post to help you with that.
4. Permission lists along with permission lists description assigned to a specific component.
SELECT menu.menuname, compdfn.pnlgrpname, auth.classid permission_list,
CLASS.classdefndesc permission_desc
FROM psauthitem auth,
psmenudefn menu,
psmenuitem menuitm,
pspnlgroup comp,
pspnlgrpdefn compdfn,
psclassdefn CLASS
WHERE menu.menuname = menuitm.menuname
AND menuitm.pnlgrpname = comp.pnlgrpname
AND compdfn.pnlgrpname = comp.pnlgrpname
AND compdfn.pnlgrpname LIKE UPPER (:component_name)
AND auth.menuname = menu.menuname
AND auth.barname = menuitm.barname
AND auth.baritemname = menuitm.itemname
AND auth.pnlitemname = comp.itemname
AND auth.classid = CLASS.classid
GROUP BY menu.menuname, compdfn.pnlgrpname, auth.classid, CLASS.classdefndesc
ORDER BY menu.menuname, compdfn.pnlgrpname, permission_list;
5. A query to help you identify Roles that are assigned to a specific permission list.
SELECT b.rolename, b.classid AS permission_list
FROM psclassdefn a, psroleclass b
WHERE a.classid = b.classid AND a.classid = :permissionlist;