Condition not evaluated in ACL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 03:35 AM
Hi,
We are trying to restrict read access for certain fields to a group for records assigned to them. All other users should not see the fields.
What I have done is create read access for the fields with required role (role assigned to the group) and used condition. When I tried testing it, it seems like the ACL did not use the condition to evaluate. In other words, the ACL is applied to all the records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 03:38 AM
I generally like to keep all conditions in one place, helps me keep my ocd in check, lol
What id do here is
use the advanced box, and in the script ill use:
if(assignment group is XXXXXXX and user has role XXXXX )
answer=true;
else
answer=false;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 03:41 AM
Are you testing with your profile? If so, admin overrides checkbox is selected which means that the ACL won't work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 03:44 AM
I impersonated other users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 03:48 AM
Next, remove the condition and add this in the script and check
if((gs.getUser()). isMemberOf( current.assignment_group) && current.assignment_group.name=='Place the assignment group name')
{
answer=true;
}
else
{
answer=false;
}