- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2022 01:22 PM
Hi all,
I am searching for a way to hide one elevated Role under the User Menu > Elevate Roles. Does somebody know a why to do that?
I have tried modifying these UI Macros, but my changes seemingly do not apply to anything, everything stays the same.
The same is true for the UI Script "ElevatedRole" and the UI Page "elevated_role_dialog"
Thanks in advance
Karl
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 01:10 AM
Hi Karl,
I see you continued on this here:
I think that is a better way of approaching this as it does not require you to customize the Elevated privilege functionality.
Using a GlideRecord Query would be a good starting point. That way you can secure the field with ACL's for a regular role. And when you need the value you can use for example an on Display business rule that loads the value of that field for usage in Client scripts.
I would suggest you close this thread to more focus on your other thread. You can do this by marking the best answer as Correct. Additionally people highly appreciate it if you reward their help by marking their comments Helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 12:10 AM
It should be something like a technical role in the background which is not for manual use.
I want to use it in scripts to grant some kind of temporary permission to the script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2022 02:57 PM
Hello,
You're not really giving us the full context, unless you literally mean you don't want that role to show. If that's the case, then navigate to that role within your instance and uncheck the "elevated role" checkbox on the role form.
Otherwise, if you gave them that role, it was expected that they'd need to elevate to it to use it. If this is not the case, then as I mentioned above, remove the elevated privilege need...or remove it from those users and unnest it, etc., if applicable.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 12:03 AM
Hi Allen,
I have a field which is needs to be unaccessible for all users except admins, but I still need the field in some client scripts and catalog client scripts to evaluate something and I did not find any other way to accomplish that but to create an elevated role which gets enabled/disabled via a script.
// ENABLE
GlideSecurityManager.get().enableElevatedRole('employee_number_user');
//DISABLE
GlideSecurityManager.get().disableElevatedRole('employee_number_user');
Maybe you know how to do it in a cleaner way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 01:10 AM
Hi Karl,
I see you continued on this here:
I think that is a better way of approaching this as it does not require you to customize the Elevated privilege functionality.
Using a GlideRecord Query would be a good starting point. That way you can secure the field with ACL's for a regular role. And when you need the value you can use for example an on Display business rule that loads the value of that field for usage in Client scripts.
I would suggest you close this thread to more focus on your other thread. You can do this by marking the best answer as Correct. Additionally people highly appreciate it if you reward their help by marking their comments Helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 07:09 AM
Ahhh okay I see I wanted to over engineer my solution, you just need to create an ACL with a role and the normal users wont see the field and business rules/script includes ignore that ACL anyway when you use GlideRecord.