How to restrict specific group incidents to only its group members and the creator

Sowmya20
Tera Contributor

Hi,

 

Restrict specific group incidents to only its group members and the creator to search/read the incident.

 

I'm trying below ACL to restrict but not working

Condition:

Assignment group is "Restricted group name"

Script:

gs.getUser().isMemberOf('811b20e21b72e700755b8480cd4bcb4a');

 

Please help.

 

Thanks,

Sowmya

 

 

 

 

 

8 REPLIES 8

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sowmya20 

How to restrict a specific group incidents to only its group members

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0790987

 

 

Instead of ACL use BR, as mentioned in above link.

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

I tried above suggested article. But still not working.

Any error you are geting?

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Not getting any error.. 

Please find below Business Rule.

Table: incident

Filter Condition: assignment is "restricted group name"

Condition: !gs.getUser().isMemberOf('restricted group name') 

Script: 

(function executeRule(current, previous /*null when async*/ ) {
var grp = current.addNullQuery('assignment_group').addOrCondition('assignment_group','!=','811b20e21b72e700755b8480cd4bcb4a');
})(current, previous);

 

Before Query

 

Test:

I have impersonated other than this Assignment group able view the ticket.