How to restrict service catalog for VIP user

shilpa344
Giga Expert

I wanted to restrict the visibility of one particular catalog for all VIP users of a particular domain. Please help.

8 REPLIES 8

shilpa344
Giga Expert

Hi Mihir,



Thanks for the reply. I believe user criteria feature is available from fuji version and my instance is on dublin version.


Hi Shilpa,



Follow below procedure to give catalog item access in in the version before Fuji.



1. Go to the maintain item. Personalize form lay out and add Entitlement script and save.



find_real_file.png



Then write below script:



  var urerref = new GlideRecord('sys_user');


  urerref.get(gs.getUserID());


  if(urerref.vip=='false'){


  answer= true;


  }


else{


  answer= false;


  }




Please go though the below link for your reference



Legacy:Service Catalog Access Controls - ServiceNow Wiki




Thanks,


Mihir


Thanks Mihir, it's working fine now.


siddharth1
Tera Contributor

write this below script in user criteria

checkVIPUsers();

 


function checkVIPUsers(){

 


  var returnflag = false;

 


  var userref = new GlideRecord('sys_user');

 


  userref.get(gs.getUserID());

 


  if(userref.vip=='false'){

 


  returnflag = true;

 


  }

 


      return returnflag;