ACL to allow write on fields when state = closed

Sam Ogden
Tera Guru

Hi All,

We have the following ACL on the Incident Table

find_real_file.png

find_real_file.png

I have then created the following ACL to allow write on a certain field on incident for people with the u_mim role at any state including closed.

find_real_file.png

find_real_file.png

When the log is in a state of resolved people with the u_mim role can still write in this field, but when the state is closed the field is showing as read only.   I've debugged on security rules and it appears to be the first ACL that is causing this.   I'm not sure how to amend this as I only want the people with u_mim to be able to amend a couple of fields when state is closed and not all the fields on the incident form.

9 REPLIES 9

Hi Sam,



what you do is



in WRITE acl for u_defect_reported_in   field.



In required role as "u_min"



now write script as



if (current.opened_by == gs.getUserID()   && current.hasRole('u_min'))


{


answer = true;


}



Please check it now and test it.



Thanks


Hi Harish,



I need the users with u_mim to be able to amend these fields regardless of if they have opened the log or not.   But they must be able to still amend these fields even if the log state has gone to closed.



Thanks


Hi Sam,



In table ACL as well First Screenshot which you have posted first screenshot.


In require role add the "u_min" role.


so table level condition has to satisfy first before it is checking for the field level ACL.



find_real_file.png


Hi Harish,



Thanks for the above.   I have added in u_min to the requires role section on the table level ACL, however it still causing the fields to be read only at state of closed.   I'm guessing it is because the condition section of this is not evaluating.   How do I change this table level ACL to exclude these 5 fields?



Thanks


Sam,



1). Please check any UI policy or client script exist on this table which is overriding it to make field READ-ONLY.



2). In your   Default   table level WRITE acl   include u_min role in REQUIRE ROLE.



3). Now in newly created field level write acl, add the u_min role in REQUIRE ROLE and also add the condition as




if (current.opened_by == gs.getUserID()   && current.hasRole('u_min'))


{


answer = true;


}



Thanks.