how to restrict the catalog item to admins catalog item is visible to particular group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 03:31 AM
i have a requirement to restrict the catalog item to admins and need to visible that catalog item to particular group(secure group)
i am trying to do with the user criteria,Available for(in Available for i mention the group name)ang tag it to that catalog item
but it is not working could you please help me to resolve the issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 03:39 AM
Hi Sajida,
Can you show me user criteria you have defined.? In case you don't want admin to see you can add admin criteria to 'Not available for' as well. And for group 'Available for' should be sufficient. If you have configured it correctly and still not visible to mentioned group please try clearing cache or try in fresh browser. It should work. Mark my answer as correct or hit like based on impact.
Regards,
Musab
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 03:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 08:07 AM
can you please help me with these
https://community.servicenow.com/community?id=community_question&sys_id=68d6ca6bdba90910bb4a474d13961958
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2022 07:42 AM
allow();
function allow() {
if (gs.getSession().isInteractive()) {
//if (gs.getUser().hasRole('maint') {
var gr = new GlideRecord('sys_user_has_role');
gr.addQuery('user', gs.getUserID());
gr.addEncodedQuery('role.nameINadmin,snc_internal');
// gr.addEncodedQuery('role.nameINadmin,snc_internal,sn_hr_sp.hrsp_released_country,sn_hr_sp.hrsp_employee,sn_hr_sp.hrsp_prioritised_country');
gr.query();
if (gr.next()) {
return false;
} else {
return true;
}
i tried this one also
if(gs.getUser().isMemberOf('CSIR secure group'))
{
answer = true;
}
else
{
answer = false;
}
plz try to help me