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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sowmya20 

 

Where you are using the security check box? 

You can achieve this via Business Rule and check the condition

 

Logged in user is member of Assignment group If yes then show else no. 

*************************************************************************************************************
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]

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

Hi 

 

security checkbox is in incident table.

 

I'm using below Business Rule:

Table: incident

Filter condition:

assignment group is XYZ

Security is True

Script:

(function executeRule(current, previous /*null when async*/ ) {

if (gs.getUser().isMemberOf('XYZ')) {
answer=true;
}else{
answer=false;
}
})(current, previous);

 

Before Query I'm running.

But while testing other than XYZ group member are able to view the incident.

Try to add Sys ID instead of group name.

*************************************************************************************************************
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]

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

 

Hi,

Tried to add sysID as well. when impersonating other than XYZ group member still they able to view security incident.

 

(function executeRule(current, previous /*null when async*/ ) {
if (gs.getUser().isMemberOf('811b20e21b72e700755b8480cd4bcb4a')) {
answer = true;
} else {
answer = false;
}
})(current, previous);