ACL to allow write on fields when state = closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2017 07:26 AM
Hi All,
We have the following ACL on the Incident Table
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.
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.
- Labels:
-
Security Operations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2017 08:34 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2017 08:45 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2017 08:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2017 08:48 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2017 09:53 AM
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.