Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Limit visibility to sctasks

AnthonyMull
Tera Contributor

Hi community 

I want to limit visibility to Sctasks and ritm records where the item = a specific item

I tried acls on there own but the oob acls are stopping it from working.  What is best approach here. Example would be appreciated 

Thanks in advance

1 ACCEPTED SOLUTION

J Siva
Kilo Patron
Kilo Patron

Hi @AnthonyMull 
PFB the sample for "Deny unless" ACL.
Ex:
1. Catalog item: Limit visibility to sctasks 

2. Custom role: restrict_task_view

3. Two test users: Test 1 -> Without custom role; Test 2 -> With custom role

JSiva_0-1739675624287.png

4. Creating Deny Unless ACL of type read on "sc_req_item" table

JSiva_1-1739675747336.png

5. Output results:

-> User TEST 1:

JSiva_3-1739675911710.png

 

-> User TEST 2:

JSiva_2-1739675837760.png

 

I hope this helps.
Please mark this as a solution if it resolves your query.
Thanks,
Siva

 

View solution in original post

14 REPLIES 14

Hi @Dushyant Siroh this did not work on an acl

Hi @Dushyant Siroh I put this on an ACL and it did not work.

 

The ACL had this script wiht the new role I created.

 

Thanks

J Siva
Kilo Patron
Kilo Patron

Hi @AnthonyMull 
PFB the sample for "Deny unless" ACL.
Ex:
1. Catalog item: Limit visibility to sctasks 

2. Custom role: restrict_task_view

3. Two test users: Test 1 -> Without custom role; Test 2 -> With custom role

JSiva_0-1739675624287.png

4. Creating Deny Unless ACL of type read on "sc_req_item" table

JSiva_1-1739675747336.png

5. Output results:

-> User TEST 1:

JSiva_3-1739675911710.png

 

-> User TEST 2:

JSiva_2-1739675837760.png

 

I hope this helps.
Please mark this as a solution if it resolves your query.
Thanks,
Siva

 

Swapna Abburi
Mega Sage
Mega Sage

Hi @AnthonyMull 

You can try Data Filtration rules as well which doesn't require any script. To configure data filtration rule, you need to first activate the plugin "Data Filtration (com.glide.data_filtration)"

https://www.servicenow.com/docs/bundle/xanadu-platform-security/page/administer/security/concept/dat...

AnthonyMull
Tera Contributor

Hi all

I got a soultion using ACL Deny, thanks for all your help.

 

Cheers