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

In this code if current logged in user is same as current record caller_id then allow access.

Glad to help you. Please close this thread by accessing my comment as a correct answer.

ricker
Tera Guru

Shouldn’t need to do anything for caller to see their INCs.  There’s an OOB ACL for snc_internal with the script below.  

current.opened_by == gs.getUserID() || current.caller_id == gs.getUserID() || current.watch_list.indexOf(gs.getUserID()) > -1;

As for ACL blocking INCs by group…Why?  Why would you want to hide INCs from ITIL users?  Why wouldn’t you use My Groups Work?  It’s not designed that way, you’ll want to make a custom role and ACL(s).

Thanks Rick !

thanks for your solution .