2010-05-26

Howto get the names of ROLE with a specified Permission List

It will be a very boring work if you want to search for the Roles one by one to see which role has the Permission List wanted.

SQL helps:
select ROLENAME from PSROLECLASS where CLASSID='[the_permission_list]';
Then we can grant user the role from the result.
insert into PSROLEUSER values ('[user_id]', '[role_name]', '[dynamic_sw]')
======== To overview all permission lists assigned to a USER. ========

select RU.ROLEUSER, RU.ROLENAME, RC.CLASSID from PSROLEUSER RU, PSROLECLASS RC where RU.ROLENAME=RC.ROLENAME and RU.ROLEUSER='PS'

No comments: