Enabling registered users to access all stores in the Extended Sites business model
HCL 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
- Open the workspace_dir\WC\xml\member\MemberRegistrationAttributes.xml file.
-
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>
In the preceding code snippet, HCL 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.