Condition not evaluated in ACL

edgar_evangelis
Tera Contributor

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.

find_real_file.png

7 REPLIES 7

Anurag Tripathi
Mega Patron
Mega Patron

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;


-Anurag

Kalaiarasan Pus
Giga Sage

Are you testing with your profile? If so, admin overrides checkbox is selected which means that the ACL won't work for you.


I impersonated other users


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;


}