
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 08:15 AM
Hello,
Can someone tell me the script to put in the ACL to allow a watchlist user to view a RITM. These are non ITIL users, I am able to allow to view the RITM normally but i need to add the condition that they are part of the watchlist for them to view it.
Thanks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 08:22 AM
Hi Sree,
Try using below script in for read ACL on respective table
var u = gs.getUserID();
answer = current.caller == u || current.opened_for == u || current.opened_by == u || current.watch_list.toString().indexOf(u) >=0;
//checks for Caller, opened for, opened by, watchlist to be same as logged in user if so allow the read access
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 08:19 AM
you can use the following line in the script section
current.watch_list.indexOf(gs.getUserID()) > -1;
Thanks,
Sai
Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 08:22 AM
Hi Sree,
Try using below script in for read ACL on respective table
var u = gs.getUserID();
answer = current.caller == u || current.opened_for == u || current.opened_by == u || current.watch_list.toString().indexOf(u) >=0;
//checks for Caller, opened for, opened by, watchlist to be same as logged in user if so allow the read access
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 08:28 AM
Thanks a lot!