ACL

roomawakar
Tera Contributor

Hi All,

 

I have a request to make a field visible only if the user is having ITIL or admin role and if the class is cmdb_ci_appl, u_cmdb_ci_saas_application and cmdb_ci_service_discovered.

 

I have written an ACL to allow the read operation only if the class name is cmdb_ci_appl, u_cmdb_ci_saas_application and cmdb_ci_service_discovered and the roles are ITIL and admin, but this isn't working.

 

Can someone please help where I am doing wrong.

Screenshot attached.

 

Thanks,

Rooma

9 REPLIES 9

Nilesh Pol
Tera Guru

@roomawakar 

please use OR between multiple class values instead of AND.

and inplace of the required roles, use script: (gs.hasRole('itil') || gs.hasRole('admin'))

and 

Go to: https://<instance>/<table_name>.do?sys_id=<record_id>&sysparm_acl_test=true for ACL debbuger.

@Nilesh Pol It is not working. made the changes. I enabled the debugger as well. It is showing as allowed.

J Siva
Tera Sage

Hi @roomawakar 
Change the ACL type "Deny-Unless". Also check the "Admin Overrides" checkbox instead of adding admin role explicitly. Aslo in the filter conditon use OR operator

JSiva_0-1746444615076.png

Regards,
Siva

 

@J Siva Isn't working. Made the changes and tested.