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:09 PM
Better than this, just code as:
- if(gs.getUser().isMemberOf('77a8880adbc932002c98d540cf9619c0'))
- return true;
Let me know if this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:19 PM
You can write your script like:
//In place of sys_id you can use group name also.
if(gs.getUser().isMemberOf('77a8880adbc932002c98d540cf9619c0')) {
answer = true;
}
else{
answer = false;
}
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:35 PM
Hi Anurag,Mihir
Thanks for your response
I tried with both the cases,still it is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:37 PM
Can you share the script that you have used now ?
Thanks,
Mihir