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

Your rating: None Average: 5 (6 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

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.