How to condition ACL based on user session origin (ESC/Workspace/...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-31-2025 08:58 AM
Hi all!
I need to implement an ACL based on the origin of the call.. in my case, if user is accessing table while using Employee Center, the ACL should return false, and otherwise true.
Is there a method in SN that would return the origin of the access?
I tried to use gs.action.getGlideURI(), but when I'm in "/esc.." it returns "api/now/sp/widget/..." so I'm not sure how reliable it is to use this method.
I tried also gs.getSession().getUrlOnStack(), but it returns null.
In this particular case I'm interested to check if the user is using Employee Center, but would be good to know how to do this check for other origins.
Appreciate any feedback!
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-31-2025 08:49 PM
not at all reliable "gs.action.getGlideURI()"
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-03-2025 01:43 AM
Hi, @Ankur Bawiskar , what would you suggest to distinguish the access origin in an ACL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-03-2025 05:42 AM
very difficult to rely.
but ideally it's not a valid business requirement to allow or deny access based on origin.
Please inform this to your customer.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-03-2025 07:04 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader