Acl Restriction from incident task table to incident based on current assignment group user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 09:18 AM
Hi All, Hope you're working well!
I want ACL script and Guidelines also If a user is part of the assignment group of an incident task, they should be able to access the incident ticket (parent) as well.
Here No specific Assignment Group and No Specific Roles For the Group members. Mainly Users haven't an "ITIL" Role.
Name :incident_task none
operation:Read
Type: Record
script:-
if (gs.getUser().isMemberOf(current.assignment_group)) {
answer = true;
} else {
answer = false;
}
For the above script I get user's incident task Records of an part of an assigenment group only. Incident Record was not access. I got Error message Like "Record not Found". Please Help Me ASAP.
Thanks In Advance!
Teja.vasantha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:35 PM
Hi @SunilKumar_P sir, could you please provide the scripting ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 05:00 AM
Hi @ vasantha Teja, The script below will check whether is the user member of any incident task related to that Incident. If yes, it will grant the access to the Incident table else restricts the access.
answer = false;
var grIncTask = new GlideRecord("incident_task");
grIncTask.addQuery("incident", current.sys_id);
grIncTask.query();
while (grIncTask.next()) {
if (gs.getUser().isMemberOf(grIncTask.assignment_group)) {
answer = true;
break;
}
}
Regards,
Sunil