Please help me on how to get this logic "gs.hasRightsTo("ui/context_menu.show_xml/read", null) "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 11:22 PM
Please help me on how to get this logic "gs.hasRightsTo("ui/context_menu.show_xml/read", null) " to check whether the user has access to this Context menu.
Thank you.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2018 01:03 AM
I'm pretty sure that is analogous to
gs.hasRole('admin')
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 07:20 AM
Hi.
This is ACL check
But it is old, so is not working with new releases and gives access only to role 'admin'
The ACL type 'ui' does not exist anymore.
You may change type to 'ui_page' like:
gs.hasRightsTo("ui_page/context_menu.show_xml/read", null) [...]
and create ACL with type 'ui_page', operation 'read' and name 'context_menu.show_xml'
Once you get ACL created you can manage access like to other resources, e.g. record.
See also:
Regards,
Pawel.