Editing read only fields (ACL)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 06:58 AM
Hello,
I'm struggling to come up with the best way to accomplish the following.
I have a field on the project table called "Go live date" and I would like to be read only if the field has a date set. If there is no set date then anyone can enter a date but doing this will lock the field out so the date can't be changed.
What I would then like is to allow a designated user with a specific role to be able to change that field whenever needed.
I'm not very good at scripting (still learning) and don't seem to be able to accomplish this using conditions in an ACL.
Does anyone have any suggestions?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 09:09 AM
Although I have a working solution I wanted to test out your response because I am grateful for the time you took to reply.
I created the UI Policy as can be seen below.
Along with the ACL you mentioned
However when testing with a user who would need to enter the date but not amend it - I'm not even able to enter it and it's probably down to the ACL as the user doesn't have the bc_test role.. this is the role that the delegated resource would have who has the permission to amend the date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 09:29 AM
Your UI Policy needs to take into two conditions: make it read-only if:
- it contains content
- the current user doesn't hold an override privilege
If both of these hold true, then it becomes grayed out.
By the looks of things, you may need some scripting to determine the roles - so perhaps two ACLs that covers the two permissible "write" situations would be easier:
- field currently contains no content and the user holds a fulfiller role (or whomever can make changes)
- field contains content but the user holds the bypass role