Hide Request Items and Catalog Tasks based on Assignment Group

Karthikpasikant
Tera Guru

Hi All,

 

I am working on a catalog item request. The catalog item name is Surveiallance Equipment Request. The request items and catalog tasks are confidential and should only be viewable by Assignment Group or Assigned To. I wrote a Read ACL on the "sc_req_item" table as below but the script isn't working. 

// var getGroup = current.assignment_group.getDisplayValue();
// if(gs.getUser().isMemberOf(getGroup)){
// 	answer = true;
// }else{
// 	answer = false;
// }
var Surveillance_Technology = gs.getProperty('67cf00150fde03000339abf8b1050ec2');

if (gs.getUser().isMemberOf(Surveillance_Technology)) {
    answer = true;
} else if (gs.getUserID == current.assigned_to)
    answer = true;
else {
    if ((current.assignment_group == Surveillance_Technology) && current.caller_id != gs.getUserID()) {
        answer = false;
    } else {

        answer = true;
    }
}

Please suggest if any corrections needed.

Thank you in advance 🙂

Karthik Babu

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello

Just creating new ACL is not enough you need to search for all the ritm Read ACLs.

You may have several and for the basic read ACLs for Requests that allow all ITIL(any other specif role) etc. to read the Ritm. Here you should add a condition that assignment IS NOT 'xyz'.

Please mark answer correct/helpful based on impact

View solution in original post

4 REPLIES 4

Saurav11
Kilo Patron
Kilo Patron

Hello

Just creating new ACL is not enough you need to search for all the ritm Read ACLs.

You may have several and for the basic read ACLs for Requests that allow all ITIL(any other specif role) etc. to read the Ritm. Here you should add a condition that assignment IS NOT 'xyz'.

Please mark answer correct/helpful based on impact

Hi Saurav,

 

Thank you for quick response. 

So you are saying that instead of adding a new ACL, update the current read ACLs for sc_req_item to add condition  for assignment?

Thanks,

Karthik Babu

No i am saying you need to create an Acl but along with that you need to check and restrict other acl

Thanks

Got it. I will try and update soon. Thank you.