Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

User Criteria for admins

Poorva Bhawsar2
Tera Contributor

Hi Community,

 

I have two user criterias:

1. I want to show my catalog item to a specific group. (Its working fine) I have added this group in available for.

2. I want to hide my catalog item from admins. Its not working, i have added admins group in not available for. But its not hiding my catalog item from admins. I am aware about this System Property "glide.sc.entitlement.override" which allows Admins to see all the Catalog Items.

 

Is there any option for me, where i can hide my catalog item from the admins?

 

Thanks,

Poorva Bhawsar

5 REPLIES 5

Anurag Tripathi
Mega Patron
Mega Patron

You might need a script to check if the user has admin then don't allow them to see the catalog

Long back I wrote an onload client script to check this and not let the user use the catalog, they can still see it but not use it.

-Anurag

Ankur Bawiskar
Tera Patron
Tera Patron

@Poorva Bhawsar2 

Did you try to handle this using script in Not available for?

Try using gs.hasRole('admin') and use this in advanced script

answer = gs.hasRole('admin');

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes i already tried this, its also not working.

 

Is there any other solution for this?

@Poorva Bhawsar2 

can you share your script and what user criteria is added?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader