ACL to restrict access to incidents assigned to 2 groups for users who are not members of those groups

nlk
Kilo Guru

Hi Community,

 

I have a read ACL script on the incident table which restricts the access to any tickets where the assignment group is Global Security.  This prevents users who are not members of the Global Security team from seeing those incidents, whilst allowing them to view all other tickets.  The Global security group members can view the tickets assigned group and all other tickets too.  I would like to add another group to this ACL, please can you advise how i do this?

if (current.assignment_group == 'fcda7ac00f634b00de2c4bfce1050ed1') {


if (gs.getUser().isMemberOf(current.assignment_group)) {


answer = true;


} else {


answer = false;


}


}


if (current.assignment_group != 'fcda7ac00f634b00de2c4bfce1050ed1'){


answer = true;


}

4 REPLIES 4

bammar
Kilo Sage
Kilo Sage

Try adding and "or" in your if statement

 

 

if (current.assignment_group == 'fcda7ac00f634b00de2c4bfce1050ed1' || current.assignment_group == 'second group  )

nlk
Kilo Guru

Thanks, I have tried this and the result is that users who are not members of either groups can see all tickets, i have also tried &&.

nlk
Kilo Guru

Hi,

I am still struggling to get this to work, I have reviewed other community posts and tried before Query BR's also without success.  And applying conditions to ACL's creating group specific roles to use in ACL's without success. Are there any other suggestions?

MercBuilding
Giga Guru

Hi,

  Are you successful in implementing this? I have similar requirement.