Is there is a way to query for all users who have a specific privilege? I am sure it comes out of the SECGATE or SECPROF table. I am trying to find a list of all users who can view the fax status tab. We are on EMR 9.8.12.
This will get you that information. First 4 selects explain how the information for the last query is obtained. The values are from my demo database so you may get different values from the first 4 queries and need to adjust the subsequent queries:
select * from SECGATE where upper(GATEDESC) like '%FAX%' --GATEID from VIEW fax queue status is 306
select * from SECPROF where GATEID = 306 --ROLEID is 1004 - this is a security role - a 16 digit # would be a PVID for a user
select * from ROLETYPE where RTID = 1004 --RTID 1004 is Fax Administrator
select * from USRINFO where ROLELIST like '%1004%' --shows which users have the Fax Administrator role
select pvid, loginname, searchname from USRINFO where PVID
in (select ROLEID from SECPROF where length(ROLEID) = 16 and GATEID = '306')
or PVID in (select pvid from USRINFO where ROLELIST like '%1004%')