ACL to restrict "write" to a group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:03 PM
Hi All,
I am trying to write an ACL,which defines the incidents should be editable only to a particular group.I wrote the below ACL but it is not working.
Please correct me if I have done something wrong
function inc(grp,prio)
{
var usr = gs.getUserID();
var grp = usr.isMemberOf();
if(grp =='77a8880adbc932002c98d540cf9619c0')
{
return true;
}
else
{
return false;
}
}
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:42 PM
Hi Mihir,
I used the below script
Name : Incident *
conditions : Priority is one of Critical or high
Script:
function inc(grp,prio)
{
if(gs.getUser().isMemberOf('MIM'))
{
return true;
}
else
{
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 11:11 PM
Just add this in the script editor.Then MIM group members can only edit the incident fields.
if(gs.getUser().isMemberOf('MIM')) {
answer = true;
}
else{
answer = false;
}
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 11:14 PM
We have an ACL which allows all the write permission to all fields if it is not closed.I marked it as inactive.
Now it is working exactly opposite
If the user is from non-MIM group he is not able to edit any incident
If the user is from MIM group,Ha can edit Critical and High priority incidents but not able to edit other priority incident.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:42 PM
Hi,
You can implement a Write ACl on Incident table at the field level with the below script as:
if(gs.getUser().isMemberOf(current.assignment_group)) {
answer = true;
}
else{
answer = false;
}
Hope this helps. Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke