Organizational Role what are the objects involve for users and managers
Hi Community,
In Organizational Role, we can specify who are the users and the managers and their relationship. On which db tables is this saving? what are the objects related? Any idea. thanks.
Like
Hello,
Information relating to the tables is given below:
- SysAdminUnit (Administration object: users and roles)
- SysUserInRole (Users in roles)
- SysFuncRoleInOrgRole (Functional role into organizational role)
- SysAdminOperation (System operations)
- SysAdminOperationGrantee (Access to system operations)
- SysEntitySchemaOperationRight (Access to objects)
- SysEntitySchemaRecordDefRight (Access to default records)
- SysEntitySchemaColumnRight - (Access to object columns)
- SysAdminUnitGrantedRight - (Delegated)
- SysWorkplace - (User Workplace)
- SysAdminUnitInWorkplace - (Users in the workplace)
- SysModuleInWorkplace - (Section in workplace)
Thank you for this information,
How about the link/relationship between the User and its Managers in Organizational role, where it is saving?
Hello Fulgen,
You can get real user roles, including those received as a manager, delegated, etc. using the script below.
Substitute the username for <SysAdminUnit.Name>.
select
sau1."Name" as UserName,
sau2."Name" as RoleName,
sau3."Name" as GotRoleFrom,
(select "CanExecute" from "SysAdminOperation" sao join "SysAdminOperationGrantee" saog on sao."Id" = saog."SysAdminOperationId" where sao."Code" = 'CanSelectEverything' and saog."SysAdminUnitId" = sau2."Id") as CanSelectEverything,
(select "CanExecute" from "SysAdminOperation" sao join "SysAdminOperationGrantee" saog on sao."Id" = saog."SysAdminOperationId" where sao."Code" = 'CanInsertEverything' and saog."SysAdminUnitId" = sau2."Id") as CanInsertEverything,
(select "CanExecute" from "SysAdminOperation" sao join "SysAdminOperationGrantee" saog on sao."Id" = saog."SysAdminOperationId" where sao."Code" = 'CanUpdateEverything' and saog."SysAdminUnitId" = sau2."Id") as CanUpdateEverything,
case WHEN sauir."Source" & 1 > 0 THEN 'YES' ELSE 'NO' END as "Role source: Self",
case WHEN sauir."Source" & 2 > 0 THEN 'YES' ELSE 'NO' END as "Role source: ExplicitEntry",
case WHEN sauir."Source" & 4 > 0 THEN 'YES' ELSE 'NO' END as "Role source: Delegated",
case WHEN sauir."Source" & 8 > 0 THEN 'YES' ELSE 'NO' END as "Role source: FuncRoleFromOrgRole",
case WHEN sauir."Source" & 16 > 0 THEN 'YES' ELSE 'NO' END as "Role source: UpHierarchy",
case WHEN sauir."Source" & 32 > 0 THEN 'YES' ELSE 'NO' END as "Role source: AsManager",
sauir."CreatedOn" as LastRolesActualization
from "SysAdminUnitInRole" sauir
LEFT join "SysAdminUnit" sau1 on sauir."SysAdminUnitId" = sau1."Id"
LEFT join "SysAdminUnit" sau2 on sauir."SysAdminUnitRoleId" = sau2."Id"
LEFT join "SysAdminUnit" sau3 on sauir."SourceAdminUnitId" = sau3."Id"
Where sau1."Name" = '<SysAdminUnit.Name>'
order by CanSelectEverything desc, CanInsertEverything desc, CanUpdateEverything desc, sau2."Name"