How can i restrict the access of incidents specific assigned to group xyz only to it's group members

Sowmya20
Tera Contributor

Hi,

 

I have requirement if incident assignment group is "XYZ" security checkbox is true. Then only part of the assignment group member incident ticket should visible. Other team should not have access to view these tickets.

 

Thanks in advance.

 

23 REPLIES 23

Hi @Sowmya20 

 

You are checking on Security Incident ( SIR module) please check the user role , some thing overwrite this script.

*************************************************************************************************************
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 SIR module, just incident table have the security checkbox and when it's enabled other team member should not able to view this ticket only XYZ group member and who opened the ticket can view the incident.

Put this Exact thing on a read ACL on Incident table

Incident.*

-Anurag

VaishnaviShinde
Kilo Sage

Hello @Sowmya20 ,

 

Please try below script

 

 

(function executeRule(current, previous /*null when async*/ ) {
var q;
if (gs.getUser().isMemberOf('811b20e21b72e700755b8480cd4bcb4a')) {
q = current.addQuery("assignment_group","811b20e21b72e700755b8480cd4bcb4a");
} else {
 //Do nothing
}
})(current, previous);

 

 

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde

Tried above scripts on before query still not working. Other than XYZ group member are able to view the incident.