UX Client Scripts not getting called for non-itil users within a workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 08:14 PM - edited 04-30-2024 08:15 PM
Hello,
I have a role that is not itil and would like them to have read access to a workspace page. They are able to view the page and fields fine, but there is some logic contained within client scripts for hiding/showing components which is not getting called. I have tested it for users with the itil role and it seems to be working as expected. I have looked around to see if there is some ACL I need to configure to get this to work. Anyone experience similar issues?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 10:00 PM
Hi @flenoci,
Are you doing some AJAX calls within the client script?
If so, there could be an ACL on the script include itself.
In the ACL [sys_security_acl] table, query where Type = client_callable_script_include and Name = your script include
e.g.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 07:22 AM
Nope here is what my UX Client script looks like:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 02:01 PM - edited 05-01-2024 02:01 PM
Looks like you are using a dot-walked field (Catalog Item's category) in the IF statement.
Are you certain that the non-ITIL users/end users can see the category field on the form?
When I tested it, the end users couldn't see the cat_item.category field on the form due to the ACLs.
End user:
ITIL user:
I am not too experienced with the client scripts in UI Builder, but I believe you can use AJAX to fetch the category value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 09:17 AM
Hmm I added an ACL so that these users could see that field but still not having any luck. I am wondering if there is something I need to do to allow them access to the api method since this is what I am seeing in the log:
ITIL:
Non-ITIL
It is not even running the second console log for these users.