How to specify exclusive conditions by ACL

tokuyamaharuyuk
Kilo Guru

For one user with ITIL role
I want to disable writing to the incident table with ACL.
Please tell me how to implement it.

1 ACCEPTED SOLUTION

AnubhavRitolia
Mega Sage
Mega Sage

Hi @tokuyamaharuyuk 

 

You can create Write ACL where in Condition you can put below code:

 

if(gs.getUserID() != '<sys_id of user>')  // sys_id of user for whom you want to restrict
answer = true;
else
answer = false;

 

Better store the sys_id of user in Property and call it using gs.getProperty('<property_name>');

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

View solution in original post

2 REPLIES 2

Veer
Tera Guru

@tokuyamaharuyuk  There are no exclusive conditions that can be added to ACLs. You need to update all the ACLs' which are granting write access to the ITIL role and add in the script if the logged-in user is not the user to which you would like to restrict access.

AnubhavRitolia
Mega Sage
Mega Sage

Hi @tokuyamaharuyuk 

 

You can create Write ACL where in Condition you can put below code:

 

if(gs.getUserID() != '<sys_id of user>')  // sys_id of user for whom you want to restrict
answer = true;
else
answer = false;

 

Better store the sys_id of user in Property and call it using gs.getProperty('<property_name>');

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023