Restrict attachments to itil users only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 04:29 AM - edited 05-24-2023 04:36 AM
Hi Team,
I have one requirement to visible attached attachments in incident table should be visible to itil users only similar to work notes visible in servicenow. Could anyone please suggests how can we achieve this?
I wrote one read al for itil user for sys_attachments table. But it is not working a expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 04:39 AM
HI @sree42 ,
I trust you are doing great.
Create a new field in the Incident table to store the visibility information. Let's call it "ITIL Visible."
Define the field as a checkbox type to represent visibility.
Next, you need to modify the read ACL (Access Control List) for the sys_attachments table to restrict access to ITIL users only. This ACL controls who can read the attachments.
To do this, navigate to "System Security" > "Access Control" > "Tables" and search for "sys_attachments" table.
Open the ACL for the sys_attachments table and add a new condition to check if the current user has the ITIL role. The condition should be similar to:
gs.hasRole('itil')
- Save the ACL and test it by logging in with an ITIL user and attempting to view attachments in the Incident table.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 04:39 AM
Hi @sree42 ,
Write an on load client script with below code
function onLoad() {
if (!(g_user.hasRole('itil')))
gel('header_attachment').style.display = 'none';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 04:42 AM