- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2023 10:59 PM
Hi is it possible to check if a admin has for example the Security Admin Role active?
I want to hide a Modul for admins, if they are not elevate at security admin
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2023 11:28 PM
Hi @Meloper ,
In sys_user_has_role table you can find the users who has Security Admin role active.
In server side scripts you can write gs.hasRole("security_admin") to check whether a user has security admin role or not
In client side scripts you can write g_user.hasRole("security_admin") to check whether a user has security admin role or not
g_user.hasRoleExactly() and gs.hasRoleExactly() as well available at client and server side.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2023 11:25 PM
Hi @Meloper ,
There are only two ways I know of OOTB. First is set active to false, which does not work for you. The second is if its a scoped app that has "Application administration" set to true.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2023 11:28 PM
Hi @Meloper ,
In sys_user_has_role table you can find the users who has Security Admin role active.
In server side scripts you can write gs.hasRole("security_admin") to check whether a user has security admin role or not
In client side scripts you can write g_user.hasRole("security_admin") to check whether a user has security admin role or not
g_user.hasRoleExactly() and gs.hasRoleExactly() as well available at client and server side.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2023 11:43 PM
Hi, do you already know how i can select that a role has to be elevated?
Like teh sec admin role.
Can i do this with a custom role also? That an admin has to elevate as this role?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2023 11:47 PM
Generally Security Admin role is only provided for the users with Admin role.
I don't think it is possible through custom role as per my knowledge.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.