Restrict specific RITM/Catalog item record viewing but let Admin and Requested for see RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I have a particular catalog item I want every user to be able to submit but after submission I only want admins and the individual that submitted the request to be able to see the RITM record (including its variables). I tried an ACL and Before Query business rule but I cant find a way to narrow it to just this catalog item and its RITM records where the requested_for = current user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I tried that and its logging "oof inside 2" in the system logs. But not working so far
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
ACLs have an "Admin overrides" box, so you don't need to include this in a script. Your ACL should look like this:
No Roles, Security Attribute Condition, or Data Condition. Your script in the Advanced Condition can be as simple as this:
if (current.cat_item.name == 'My Catalog Item') {
if (gs.getUserID() == current.opened_by) {
answer = true;
} else {
answer = false;
}
} else {
answer = true;
}
An issue you may run into in your instance if this isn't working is that there are other Read ACLs on sc_req_item, -- None -- that are conflicting, so you'll have to inactivate or update those to incorporate this logic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Say I have several others - each one would require I add this logic into it?
Sorry - I cant tell if that's standard or not for ServiceNow ACL's. Wouldn't everyone just have one large ACL per table with lots of nested logic in it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Yes, you would need to add it on each one, or try to make one with all of the logic. A better approach in this case is to change this new one to the Decision type = Deny Unless, and change the script to the negative like this:
if (current.cat_item.name != 'My Catalog Item') {
answer = true;
} else if (gs.getUserID() != current.opened_by) {
answer = false;
} else {
answer = true;
}
