Need to create ACLs to restrict the ITIL users to view the attachments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 01:59 AM
Need to create ACLs to restrict the ITIL users to view the attachments. Currently there is no restriction on unauthorized users accessing documents which needs to be restricted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 02:02 AM
Hi,
on which table?
I am taking example of incident table
you can create a new table level READ ACL on sys_attachment
1) Condition
Table Name = incident
2) Give the role to whom the attachments should be seen
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 02:06 AM
Hi,
you can use advanced script in ACL if you don't wish to use roles
answer = !gs.hasRole('itil');
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 02:08 AM
Hi ,
create read ACL on sys_attachment table and click on advance script check box
and in script section use below script
hideAttachment();
function hideAttachment() {
// if table is incident and user has this role "ITIL" then this acl evaluates to false and attachments will not be visible
if (current.table_name == '<your table name>' && gs.hasRole('ITIL'))
return false;
}
return true;
Thanks
Valmik