Enabling Clarity's Delegated Administration

Liferay’s account roles support distributed access control, enabling B2B customers to manage their own teams. Clarity wants to empower its distributors to handle their own user management, reducing the burden on internal support staff. To achieve this, they’ll leverage account roles to provide scoped permissions for account users to manage their team’s available actions.

In these exercises, you'll expand Clarity’s delegation model by creating a custom role, assigning roles to users, and enabling administrators to delegate purchasing responsibilities.

Exercise: Creating Clarity's Associate Buyer Role

Clarity needs a new distributor buyer role that doesn’t include permissions to manage payment or delivery terms. Here, you’ll create this new Associate Buyer role as Clarity’s IT Manager, Ian Miller.

  1. Sign in using these credentials:

    • Username: ian.miller@clarityvisionsolutions.com

    • Password: learn

  2. Open the Global Menu (icon-applications-menu.png), go to the Control Panel tab, and click Roles.

  3. Go to the Account Roles tab.

  4. Click Actions (icon-actions.png) for the Buyer role and select Duplicate.

    Liferay UI screenshot: On the Account Roles tab, the Duplicate option is revealed after clicking the actions icon to the right of the Buyer role.

  5. For New Role Name, enter Associate Buyer and click Save.

  6. Navigate to the Define Permissions tab.
    This displays all permissions granted by the Associate Buyer role.

  7. For each permission listed below, click Remove and then OK to confirm.

Section Permission
Open Carts > Orders Manage Commerce Order Payment Methods
Open Carts > Orders Manage Commerce Order Shipping Options
Open Carts > Orders Manage Multishipping
Open Carts > Orders Manage Order Delivery Terms
Open Carts > Orders Manage Order Payment Terms

 

Liferay UI screenshot: The Associate Buyer role has similar permissions as the Buyer role, but the only remaining management permission is to manage the account's addresses.

Great! You’ve created an Associate Buyer role that can create and check out orders without modifying an account’s payment, delivery, or shipping methods.

Exercise: Assigning Users to B2B Accounts

To improve self-service, Clarity wants to grant distributor managers the Account Administrator role so they can manage their own team's users and permissions. Here, you’ll assign this role to a Beaumont Optics LTD user as Ian Miller.

  1. Open the Global Menu (icon-applications-menu.png), go to the Control Panel tab, and click Accounts.

  2. Select the Beaumont Optics Ltd account.

  3. Go to the Users tab.
    Note that Chloe Hunter is assigned to this account.

  4. Click New and select Assign Users.

  5. Select Mark Walker and click Assign.

    Liferay UI screenshot: Both Chloe Hunter and Mark Walker have the checkbox next to their name selected.

  6. In the list of users associated with the account, click Actions (icon-actions.png) for Mark Walker and select Assign Roles.

  7. Select Account Administrator and click Done.

    Liferay UI screenshot: The Account Administrator checkbox is now selected.

Well done! You’ve assigned Mark Walker the Account Administrator role. He is now able to manage roles and permissions for his team.

Exercise: Delegating the Buyer Role

Now that Mark is an Account Administrator, he can configure roles for his colleagues without reaching out to Clarity’s support team. Here, you’ll delegate account responsibilities as Mark by assigning the Associate Buyer role to a team member.

  1. Sign in using these credentials:

    • Username: mark.walker@beaumontoptics.com
    • Password: learn
  2. Click the User Profile Menu and select My Sites.

    Liferay UI screenshot: After clicking on the user profile picture in the upper right, the My Sites option is revealed.

  3. Go to the My Sites tab and select Distributor Portal.

    Liferay UI screenshot: The Distributor Portal site option is available on the My Sites tab.

  4. Navigate to the Account Management page:  http://localhost:8080/web/b2b/account-management.

    Liferay UI screenshot: The Account Management menu is at the bottom of the left sidebar.

  5. Select the Beaumont Optics Ltd account.

    Liferay UI screenshot: The Beaumont Optics Ltd name is a clickable button.

  6. Go to the Users tab.

  7. Click Actions (icon-actions.png) for Chloe Hunter and select Assign Roles.

  8. Select Associate Buyer and click Done.

Great! As Mark, you’ve successfully delegated the new Associate Buyer role to Chloe.

Exercise: Verifying Account Delegation

Here, you'll verify that Chloe Hunter can perform the expected actions using her new role.

  1. Sign in using these credentials:

    • Username: chloe.hunter@beaumontoptics.com
    • Password: learn
  2. Navigate to the Account Management page: http://localhost:8080/web/b2b/account-management.
    Unlike Mark, Chloe doesn’t have adequate permissions to edit the account’s details.

  3. Navigate to the Catalog page: http://localhost:8080/web/b2b/catalog.

  4. Click Add to Cart for a product.

    Liferay UI screenshot: After navigating to the catalog in the left sidebar, the Add to Cart button was selected for Trendy Oversized, and the cart in the upper right now includes a product.

  5. On the top right, click Cart () and click Submit.

    Liferay UI screenshot: The submit button is in the bottom right after clicking the mini cart icon.

Great! You’ve confirmed the Associate Buyer role enables Chloe to build carts and checkout without allowing her to edit the account’s details.

Conclusion

Delegated administration is crucial for creating scalable B2B solutions that reduce administrative overhead. You’ve successfully implemented this structure for Clarity, empowering their B2B partners to manage their own teams by correctly assigning and verifying account roles.

Next, you’ll review what you’ve learned before moving on the next module.

Loading Knowledge