How to List Data Query user security information.

Document ID : KB000044474
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

We need to get a report showing the different authorizations that our users have.

Could you tell us how? 

 

Answer:

The following Data Query request will do it:

FIND RELATIONSHIP RELATED BY SUBJ-OCC-NAME VIA ENTITY-NAME TO PERSON 
WITH PERSON.ENTITY-VER = RELATIONSHIP.SUBJ-VRS-NUM AND 
PERSON.STATUS NOT = 'H' AND 
RELATIONSHIP.ENTITY-NAME = 'PER-ATZ-AUTH' AND 
RELATIONSHIP.OBJ-OCC-NAME = '$DQ-#' 
SORT RELATIONSHIP SUBJ-OCC-NAME OBJ-OCC-NAME 
PRINT FROM RELATIONSHIP SUBJ-OCC-NAME 'USER NAME' 
OBJ-OCC-NAME 'AUTHORIZATION' 

The above query provides the following report: 

USER NAME               AUTHORIZATION 
---------------------------- ---------------------------- 
userid                           $DQ-ADDR-tttddd 
userid                           $DQ-UPDR-tttddd 
userid                           $DQ-DELR-tttddd 
userid                           $DQ-DISR-tttddd 

where: 

. userid is the user's id 
. function: 
ADDR means INSERT authority 
UPDR means UPDATE authority 
DELR means DELETE authority 
DISR means FIND authority 
. ttt is the 3 position table name 
. ddd is the dbid number 
-----