How to hide records using ACL's

Sironi
Kilo Sage

Hi All,

Could you please help me on ACL's 

Hide "Leaders" group incident records if logged in user is not a member and rest of all incidents should be visible in normal .

"Leaders" group members should be see all incidents with out restrictions 

1 ACCEPTED SOLUTION

Try below

var information_security = gs.getProperty('security_inc_assignment_group_UITSIS'); // sys_id of "UITS Information Security" group
var iso_Leaders = gs.getProperty('security_inc_assignment_group_UITSIL'); //sys_id of "UITS ISO Leadership" group

if (gs.getUser().isMemberOf(information_security) || gs.getUser().isMemberOf(iso_Leaders)) {
    //gs.addInfoMessage(gs.getMessage("Looged in user id is a Member in Security Groups"));
    answer = true;

} 
else if(gs.getUserID==current.caller_id)
answer=true;
else {
    // gs.addInfoMessage(gs.getMessage("Looged in user id not Member in Security Groups"));
    if ((current.assignment_group == information_security || current.assignment_group == iso_Leaders)&& current.caller_id!=gs.getUserID()) {
        answer = false;
    } else  {
		
        answer = true;
    }
}

View solution in original post

18 REPLIES 18

Tony K
Kilo Sage

I personally like the query business rule, easier to configure and test than messing with an ACL.

This example condition has both a role and member of a specific group requirement. 

find_real_file.png

Hi Tony,

we already done it by Query BR.

Client requested to use ACL's, So kindly help me how can achieve it

it's covered here

https://community.servicenow.com/community?id=community_question&sys_id=d9c8a4141bd2b4500ccc85176e4bcb2c

i have followed this thread url, here they proposed Query BR solution.