How to restrict specific group incidents to only its group members and the creator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2024 11:37 PM
Hi,
Restrict specific group incidents to only its group members and the creator to search/read the incident.
I'm trying below ACL to restrict but not working
Condition:
Assignment group is "Restricted group name"
Script:
gs.getUser().isMemberOf('811b20e21b72e700755b8480cd4bcb4a');
Please help.
Thanks,
Sowmya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 03:57 AM
remember you need to ensure the OOB query business rule on incident table is also updated to handled this use-case
update the query BR in addition to your above ACL
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 05:21 AM
Hi Ankur,
Thank you for replying
Please find below Business Rule.
Table: incident
Filter Condition: assignment is "restricted group name"
Condition: !gs.getUser().isMemberOf('restricted group name')
Script:
(function executeRule(current, previous /*null when async*/ ) {
var grp = current.addNullQuery('assignment_group').addOrCondition('assignment_group','!=','811b20e21b72e700755b8480cd4bcb4a');
})(current, previous);
Before Query
and ACL
if(gs.getUser().isMemberOf('811b20e21b72e700755b8480cd4bcb4a'))
{
answer=true;
}
answer=false;
Test:
I have impersonated other than this Assignment group able view the ticket.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 10:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 10:02 PM