How to hide catalog item for user and group in domain seperated instance

mahesh105
Tera Contributor

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?

2 REPLIES 2

-Andrew-
Kilo Sage

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:

  1. 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')

  2. 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.

  3. 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!!

Rajesh Chopade1
Mega Sage

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

https://docs.servicenow.com/en-US/bundle/tokyo-servicenow-platform/page/product/service-catalog-mana... 

 

Thank you

Rajesh.