- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 12:42 AM
I have 12 Assignment group .
My requirement is : Assigned should should be only editable if it's the member of group .
I have written the ACL on assigned to . It's working fine if I hardoce the Assignemtn group value in isMemeber of function .
But ebery time my Assignemtn group changes .
I have writtent he Below acl:
var x= current.assignment_group.name;
gs.info("Group nameeeeee="+x);
if(gs.getUser().isMemberOf(x))
{
answer=true;
}
else
{
answer=false;
}
But this is not working : It;s showing error in logs
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:55 PM
Hello everyone ,
I got my answer .
Actually gs.getUser().isMemberOf doesnot work in SCOPED APPLICATION.
Please refer the lonk:
Configure the ServiceNow-initiated Qualys IP scan
I implemeted their script and it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:36 PM
getting error :
java.lang.RuntimeException: failed to coerce com.glide.script.fencing.ScopedGlideElement to desired type java.lang.String
Caused by error in Access Control: 'x_mkgaa_non_confor_non_conformance_tasks.assigned_to' at line 2
1:
==> 2: if(gs.getUser().isMemberOf(current.assignment_group))
3: {
4: gs.info("groupppppp name okkk");
5: answer=true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 01:26 AM
can you try this:
if(gs.getUser().isMemberOf('Assignment group'))
{
answer = true;
}
else
{
answer = false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:33 PM
this would be hard-code type .
But I want if the user is member of particular assignemnt group.
"gs.getUser()isMemberOf(current.assignment_group)" This is also not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:44 PM
Hey,
Can you try this gs.getUser()isMemberOf(current.assignment_group.sys_id+'')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:55 PM
Hello everyone ,
I got my answer .
Actually gs.getUser().isMemberOf doesnot work in SCOPED APPLICATION.
Please refer the lonk:
Configure the ServiceNow-initiated Qualys IP scan
I implemeted their script and it worked.