UX Client Scripts not getting called for non-itil users within a workspace

flenoci
Tera Contributor

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? 

 

bug1.PNG

bug2.PNG

  

6 REPLIES 6

James Chun
Kilo Patron

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.

JamesChun_0-1714539567110.png

 

 

Cheers

Nope here is what my UX Client script looks like: 

bug3.PNG

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.

JamesChun_2-1714596564930.png

 

End user:

JamesChun_0-1714595163836.png

ITIL user:

JamesChun_1-1714595192396.png

I am not too experienced with the client scripts in UI Builder, but I believe you can use AJAX to fetch the category value.

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:

DEBUG1.PNG

Non-ITIL

debug2.PNG

 

It is not even running the second console log for these users.