How to hide catalog item for user and group in domain seperated instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:22 AM
We have a domain seperated instance in which I have to hide certain catalog item for users not having itil role or user is not from "Servicenow Hr" group. First thing i tried is user criteria but it is not working because user criteria is not supported in domain seperated instance.
So we tried to hide using ACL. But also it did not work.
Is their any way to hide catalog item based on role and group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:26 AM
Hi Mahesh,
Yes, there sure is a way to hide a catalog item based on a user's role and group in a domain-separated instance. Here's how you can do it:
Create an ACL that restricts read access to the catalog item to users with the ITIL role or members of the "ServiceNow HR" group. Here's an example ACL:
Name: Hide Catalog Item Description: Restricts access to the catalog item Type: Catalog Item Operation: Read Condition: gs.hasRole('itil') || gs.getUser().isMemberOf('ServiceNow HR')
Apply the ACL to the catalog item that you want to hide. Open the catalog item record, go to the "Access" tab, and add the ACL to the "Read" access control rule.
Test the catalog item visibility for a user without the ITIL role or membership in the "ServiceNow HR" group.
Note that this approach may not work if the catalog item is accessed through a variable set or a service catalog category that grants read access to all items in the category. In that case, you may need to create an ACL that restricts read access to the category instead of the catalog item.
Hope this helps!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:29 AM
Hi @mahesh105
you can use criteria in catalog item.
User Criteria may be used to restrict access to records in Service Catalog and Knowledge. You can apply user criteria to both Categories & Catalog items. You can apply User criteria from here: User Criteria will allow you to combined Users, Groups & Roles as a single entity.
following link will help you
Thank you
Rajesh.