Question regarding ACL permission based on VIEW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2014 12:19 PM
Is there a possibility of allowing ACL WRITE/CREATE permission based on view? I have created a view called "End to End Support" within cmdb_ci_service table. The idea is to allow users to have a WRITE permission if they have a certain role and they changes view to "End to End Support".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 02:43 AM
We've created a 'write' acl, which grants write access unless the view is ess. This assumes they are already using the correct view. The problem we are having with this is it seems to be affecting the ability to edit lists.
Add the following to the ACL's script replacing 'ess' for whatever your view name is and it might work.
---------------------------------------------------------------------------------------------------------------
var my_current_view = RP.getParameterValue('sysparm_view');
if (my_current_view == 'ess') {
answer = false;
}
else {
answer = true;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 02:54 AM
or you try this and check
(gs.action.getGlideURI().get('sysparm_view').toString() == 'view name')