Question regarding ACL permission based on VIEW

pss_rets
Kilo Explorer

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".

2 REPLIES 2

adam_reavenall
Mega Contributor

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;


}


Kalaiarasan Pus
Giga Sage

or you try this and check



(gs.action.getGlideURI().get('sysparm_view').toString() == 'view name')