ACL restriction based upon variable.

Chad Wilhelm1
Tera Expert

Hello,

We have a requirement to lock down records (REQ and RITM) to one catalog item Spot Bonus.  Those can view would be those with a manager role as long the manger is not the one who getting the spot bonus. There is a variable called user receiving bonus.  I am having issues restricting the manager from seeing it if they are the user in the variable.  Any assistance is appreciated.

find_real_file.png

 

1 ACCEPTED SOLUTION

Use below script 

if(current.request_item.variables.variablename!= gs.getUserID() )
answer=true;


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

22 REPLIES 22

Use below script 

if(current.request_item.variables.variablename!= gs.getUserID() )
answer=true;


Please mark this response as correct or helpful if it assisted you with your question.

Thanks!!

Hello,

How would use this to restrict on Catalog Task? See below

Thanks,

Chad

find_real_file.png

Use below script 

if(current.request_item.variables.variablename!= gs.getUserID() )
answer=true;


Please mark this response as correct or helpful if it assisted you with your question.

sachin_namjoshi
Kilo Patron
Kilo Patron

Hi,

You will have to use client script to lock down catalog item variables.

Please follow below post for further direction

https://www.servicenowguru.com/scripting/business-rules-scripting/variables-form-readonly/

 

Regards,

Sachin