Simple ACL script not working

e_wilber
Tera Guru

Hi everyone,

I modified the OOB ACL for Incident (read) from: current.opened_by == gs.getUserID() || current.caller_id == gs.getUserID() || (current.watch_list.indexOf(gs.getUserID()) > -1

to:

(current.opened_by == gs.getUserID() || current.caller_id == gs.getUserID() || (current.watch_list.indexOf(gs.getUserID()) > -1) || (gs.hasRole('event_group') && gs.getUser().isMemberOf(current.assignment_group)));

And it's not allowing read access. What I tried to add to the OOB condition is a check to see if the user has a custom role AND is a member of the assignment group. The other conditions should remain the same.

My test user has the event_group role and is in the assignment group of multiple incidents but they aren't seeing any records on the incident table.

This custom role does not inherit the itil role.

Any ideas what is misfiring?

6 REPLIES 6

Sharique Azim
Mega Sage

replace gs.getUser().isMemberOf(current.assignment_group) to gs.getUser().isMemberOf(current.assignment_group.getDisplayValue().toString())



with current.assignment_group you are just passing the sys_id, but with the other you are passing the string value of the display value.


Hi,



Did you get a chance to try what i suggested?