Permission Lists Assigned to a User
SQL that I find useful in many occasions. It will return a list of permissions that are assigned to a specific user.
SELECT d.oprid, d.oprdefndesc, c.roleuser, a.rolename, a.classid,
b.classdefndesc
FROM psroleclass a, psclassdefn b, psroleuser c, psoprdefn d
WHERE a.classid = b.classid
AND c.rolename = a.rolename
AND d.oprid = c.roleuser
AND d.oprid = :userid
GROUP BY d.oprid,
d.oprdefndesc,
c.roleuser,
a.rolename,
a.classid,
b.classdefndesc;
-- at run time, substitute :userid with the user id you want the SQL to run against.