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
Procedure
- 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.
-
Locate the MemberRegistrationAttributes.xml file on your system. By
default it is in the following directory:
- WAS_installdir/profiles/instance_name/installedApps/WC_nstance_name_cell/WC_ nstance_name.ear/xml/member
- WCDE_installdir\workspace\WC\xml\member
-
Open the MemberRegistrationAttributes.xml file and locate the section that
defines the user roles. Locate the
<UserRoles>
element. -
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>
-
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.