WebSphere Commerce Enterprise

Enabling registered users to access all stores in the Extended Sites business model

WebSphere Commerce users can access storefronts by virtue of having the role of Registered Customer in the organization that owns the store, or in any organization above it. The roles a user has access to during registration are defined within the MemberRegistrationAttributes.xml file.

About this task

By default the MemberRegistrationAttributes.xml file is set up to give access to only the store where the user is registering. If there are two stores, store A and store B, registered customers for store A are assigned to organization A, and have no access to store B, which belongs to organization B. To allow registered customers to access all stores, you must change the Register Customer role context in the MemberRegistrationAttributes.xml file. Within an Extended Sites model, create all stores should be created under the Extended Sites seller organization.

Procedure

  1. The MemberRegistrationAttributes.xml is deployed as part of the WebSphere Commerce Enterprise Archive (EAR) file. Therefore, see Stages of deploying customized assets and follow the instructions for packaging a single file and deploying single file.
  2. Locate the MemberRegistrationAttributes.xml file on your system. By default it is in the following directory:
    • LinuxAIXWindowsFor IBM i OS operating systemWAS_installdir/profiles/instance_name/installedApps/WC_nstance_name_cell/WC_ nstance_name.ear/xml/member
    • WebSphere Commerce DeveloperWCDE_installdir\workspace\WC\xml\member
  3. Open the MemberRegistrationAttributes.xml file and locate the section that defines the user roles. Locate the <UserRoles> element.
  4. Within the <UserRoles> </UserRolese> section, include the following code to define the new user role.
    
    	<User registrationType="UserRegistration" memberAncestor="o=Default Organization,o=Root Organization" 
    	    storeAncestor="o=Extended Sites Seller Organization,o=Root Organization">
      <Role name="Registered Customer" roleContext="explicit" DN="o=Extended Sites Seller Organization,
      o=Root Organization"/> 
    </User>  
    
  5. Restart your WebSphere Commerce Server.
    In the preceding code snippet, WebSphere Commerce scans down the list of User nodes until it finds the role that matches the appropriate criteria. The matching is determined by the following criteria:
    • The registrationType (thus, the system is invoking a standard UserRegistrationAdd command).
    • The member's ancestor (in this case, the user's parent organization must be somewhere under the default organization).
    • The store's ancestor (in this case, the system matches on any store that is under the Extended Sites Seller Organization).
    • The Register Customer role that is given is explicitly given within the Extended Sites Seller Organization.