How to hide specific attachment to all the users except admin's

Sironi
Kilo Sage

Hi All,

How to hide specific attachment to all the users except to admin's  and Assignment Group.Manager on Incident Record.


2 REPLIES 2

Allen Andreas
Administrator
Administrator

Hello,

You can control this via "read" ACL on the sys_attachment_table to limit who can see it.

Condition would be that the table involved is incident and then whatever else you need that you mean by "specific attachment", so if the name contains x or whatever, and in the script section add something like:

 

answer = false;
if (gs.hasRole('admin') || current.assignment_group.manager == gs.getUserID()) {
anwer = true;
}

 

Remember though, you have other "read" ACLs most likely, so you'll have to review those and not allow the same user to pass those.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi ,

Thanks for reply

I tried your solution ACL , but still attachment is showing to all the users irrespective of conditions .
Operation: read
table: sys_attachment    -None-
condition : table |is|Incident          AND   file|contains|INC001
script : 

 

answer=false;
if(current.assignment_group.manager == gs.getUserID() || gs.getUSer().isMemberOf('Metric Promote DGH')){
answer=true;
}