Creating a user with the Recipe Manager role to access the Recipes tool

In this lesson, you create a new user and assign the Recipe Manager role to the user. The Recipes tool is accessed only by users with Recipe Manager role.

Procedure

  1. Create a user in the Organization Administration Console with the following properties:
    • Parent organization: Root Organization
    • Account policy: Administrators
  2. Assign the Recipe Manager role to the new user you created.
    For more information about assigning the role, see Selecting roles for a user.
  3. Open IBM WebSphere Commerce Developer.
  4. In the Enterprise Exploer, expand WC > xml > config > com.ibm.commerce.infrastructure-ext.
  5. Open the wc-component.xml file for editing. If this file does not exist, you must create this file.
  6. Update the value for the internalvalue attribute to include the value for your new Recipe Manager role ID for each store mapping that your new tool needs to support.
    The following code snippet shows the configuration to map the role IDs.
    
    <?xml version="1.0" encoding="ISO-8859-1"?>
    ...
    <_config:valuemappingservice>
      <_config:valuemapping externalName="StoreType" internalName="StoreType">
        <!-- Map tool type to STORE.STORETYPE in database -->
        ...
        <_config:valuemap externalValue="MyCompany_RecipeTool" 
          internalValue="B2C, B2B, BBB, MPS, BMP, MHS, BMH, CPS, RHS, BRH, SCS, CHS, SCP, SHS" />
      </_config:valuemapping>
    				
    <_config:valuemapping externalName="RoleType" internalName="RoleType">
    			 	
      <!-- Consumer Direct -->
      <_config:valuemap externalValue="B2C" 
        internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,-35,your_role_id" />
    			
      <!-- Basic B2B -->
      <_config:valuemap externalValue="BBB" 
        internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,-35,your_role_id" />
    
      <!-- Supply Chain Model -->
      <_config:valuemap externalValue="SPS" 
        internalValue="-18,-19,-4,-9,-1,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="SHS" 
        internalValue="-19,-13, -18,-9,-4,-17,-16,-1,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="SCP" 
        internalValue="-27,-9,-1,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="SCS" 
        internalValue="-18,-19,-4,-16,-1,-32,-33,-34,-9,-35,your_role_id" />
    
      <!-- Extended Site Model -->
      <_config:valuemap externalValue="MPS" 
        internalValue="-9,-1,-4,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="BMP" 
        internalValue="-19, -18, -9,-1,-4,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="HCP" 
        internalValue="-27,-1,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="MHS" 
        internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,-35,your_role_id" />
      <_config:valuemap externalValue="BMH" 
        internalValue="-19,-18,-9,-4,-17,-8,-16,-13,-1,-32,-33,-34,-35,your_role_id" />
    
      </_config:extendedconfiguration>
    </_config:DevelopmentComponentConfiguration>
    
    • Where your_role_id is the ROLE_ID for your Recipe Manager. For example, 10001
    There two main purposes of the customization of this configuration file:
    • To map the new tool to store types. The new tool is represented by externalValue="MyCompany_RecipeTool", which is used when you add the new tool to the Management Center. The store types that are mapped with the new tool include B2B, B2C, and the Extended Site Model stores, which means that the new tool can be used with these stores.
    • To map the store to the role types. You must add the new role, the Recipe Manager role, to the store types configuration. In the line
      
      <_config:valuemap externalValue="B2C"  
        internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,-35,your_role_id" />
  7. Double check the values in your database with the following SQL statement and replace 10001 with the correct Recipe Manager role ID in your system.
    select role_id, name from role;