How to hide specific attachment to all the users except admin's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 01:13 PM - edited 07-29-2024 01:14 PM
Hi All,
How to hide specific attachment to all the users except to admin's and Assignment Group.Manager on Incident Record.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 01:35 PM - edited 07-29-2024 01:36 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 03:50 PM - edited 07-29-2024 03:52 PM
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;
}