restricting access to certain fields on a form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 11:30 AM
Hello,
I have a requirement that the status field on the cmdb_ci form should only be editable by an admin. We have a role that allows general editing on this form with an ACL so I tried to create a UI policy to make the required field read only, but I guess the ACL trumps the UI policy because I didn't get my intended effect.
Is there a script that I can add to the ACL to make this field read-only? I am not familiar with scripting at all, but I am not seeing an alternative.
Thanks in advance,
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 04:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2015 07:54 PM
Thanks, Mani. So If I want to restrict more than one field on this form, do I create additional ACLs or is there a script that I can write or?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 10:26 PM
In that ACL you need to add two roles (admin and the other role whom you want to give access) into the Roles list below that form . "Or"
Remove all roles from related list and write following kind of code in the script field
answer = false ;
if(gs.hasRole('admin') || gs.hasRole("Role2")){
answer = true ;
}
//replace Role2 with the name of other role whom you want to give access