Roles, Permissions, and Users Assigned to Portal Content Reference or Component

Your rating: None Average: 5 (7 votes)

Roles attached to a component (portal_uri_seg2) or content reference (portal_objname)

SELECT DISTINCT c.portal_name, c.portal_objname, b.rolename, e.descr
  FROM psroleclass b, psprsmperm c, psprsmdefn d, psroledefn e
    WHERE c.portal_objname = d.portal_objname
            AND b.classid = c.portal_permname
            AND b.rolename = e.rolename
            AND (d.portal_uri_seg2 = :1 OR d.portal_objname = :2);

Permissions attached to a component (portal_uri_seg2) or content reference (portal_objname)
SELECT DISTINCT d.portal_name, d.portal_objname, c.portal_permname, e.classdefndesc
    FROM psprsmperm c, psprsmdefn d, psclassdefn e
     WHERE d.portal_objname = c.portal_objname
            AND d.portal_name = c.portal_name
            AND c.portal_permname = e.classid
            AND (d.portal_uri_seg2 = :1 OR d.portal_objname = :2);

Users that can access a component (portal_uri_seg2) or content reference (portal_objname)
SELECT DISTINCT c.portal_name, c.portal_objname, a.roleuser, e.oprdefndesc
    FROM psroleuser a,
              psroleclass b,
              psprsmperm c,
              psprsmdefn d,
              psoprdefn e
          WHERE c.portal_objname = d.portal_objname
            AND a.rolename = b.rolename
            AND b.classid = c.portal_permname
            AND a.roleuser = e.oprid
            AND (d.portal_uri_seg2 = :1 OR d.portal_objname = :2);

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
3 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.