Restrict Standard Change Templates to members of the template owner group

ronaldanand
Tera Contributor

Hi All,

Currently anyone can create a standard change from available templates. I want it to restricted to only allow members of the template owner group to create changes from templates. EX. If a member of TEST GROUP CHNAGE1 creates a standard change template, only members of that group have access to create a change off that template.

only Members of template owner group can create standard changes from template.Non-members of template owner group are not able to create standard changes from template.

Please check and help me how to do this.

Thanks in advance!!!!

13 REPLIES 13

Hi,

Then you can add Available for related list and define a User Criteria, like groups are x, y, &. z (see image below).

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thanks you

Cheers
Alberto

find_real_file.png

ronaldanand
Tera Contributor

Thanks alot albert, Its working!!!

You're welcome 🙂

ronaldanand
Tera Contributor

Hi Albert,

Thanks for you support, But My requirements is difference whenever user click the "Standard: Select to propose a standard change template or standard ticket off a pre-approved standard change template." . The template landing page only can list out which i am mbmberof template owner group templates.

if any possible to restrict this ,The above soltion we can do manually for all the items so this solution not work out for me.

We had a similar requests when the users submits a "proposed" standard change, they need to assign a "Group". The business side of the house only wanted the members of the group that was selected on the template to be able to see it in the catalog . 

 

Here is how I implemented this. 

  1. Created flow designer that triggers when Catalog item (sc_cat_item) is created. Filtered to only get the standard changes and not every catalog item 
    JamesKailukai1_7-1689685200947.png

     

  2. I then looked up the User Criteria (UC)  (user_criteria) to see if there is an existing entry for the catalog item (sanity check). It should not find one, but 90% of code is for the stuff that never happens
    JamesKailukai1_6-1689685137223.png

     

  3. If the UC does not exist it will create one
    1. Needed to get the group from the Standard Change Template Value table, this is where the values are stored.  
      JamesKailukai1_8-1689685261698.png

       

    2. Once I have the record, I set a flow variable with the sys_id of the group I want to limit the catalog item to. Script I used to set flow variable:
      JamesKailukai1_2-1689685044788.png
      // The format of the template variables is a single string. We are looking for the starting
      // position the "assignment group" text, the sys_id of the group follows it.
      var tmpltValues = fd_data._3__look_up_record.record.template;
      var position = tmpltValues.search("assignment_group");
      var groupSysId = tmpltValues.substring((position + 17), (position + 49));
      return groupSysId;
  4. I then created a User criteria record
     JamesKailukai1_1-1689685007362.png
  5. I set another flow variable to store the UC record I just created. This was done just to prevent having to duplicate the code later in the script to create the Catalog Available for Record. 
    JamesKailukai1_10-1689685587840.png

     

  6. If the UC was found I set the same flow variable as used in Step 5, only difference is that I set it to the UC record that was found. 
    JamesKailukai1_9-1689685559864.png

     

  7. I then look up the Catalog Available for
    JamesKailukai1_11-1689685625744.png

     

  8. If the Catalog Available for is not found create a record, if found do nothing.
    JamesKailukai1_12-1689685703862.png

     

Here is screenshot of the flow: 

JamesKailukai1_13-1689685768847.png

This sets the User Criteria on the Catalog item to use the User Criteria that has just the group in it. Users that go to the service catalog can only see the item if they are a member of the group.