Minium order selector not working using Buyer role

Federico Stendardi, modified 5 Years ago. New Member Posts: 12 Join Date: 2/3/20 Recent Posts
Step to reproduce:
- download the 2.0.7 bundle with Tomcat from https://www.liferay.com/it/downloads-community
- create a new site using the Minium Site Template
- add a new user giving him the site membership and assigning him the Buyer Site Role for the site created in the previous step
- create a new Ecommerce Account, and add the user created in the previous step to it
- log in using the newly created user, and navigate to the site home page (catalog page)
- add a product to the cart
- click the account selector at the top right corner
- the popup doesn't list the newly created order
Looking at the XHR request that is issued to populate the dropdown, it seems that the user doesn't have the  view open cart permission, even though it's defined in the Buyer role.
If I add that permission to a Regular Role (for example the 'User' role), everything works as expected.
See attached screenshots
thumbnail
Jeffrey Handa, modified 5 Years ago. Liferay Master Posts: 541 Join Date: 12/1/08 Recent Posts
Hi Federico, thanks for providing such detailed information.  The Buyer, Order Manager, and Account Administrator roles are unique in that they are scoped to the Account.  This is a new concept introduced by Liferay Commerce so DXP widgets incorrectly show them as Site Roles.  Because these are roles are Account scoped, you must assign them from Commerce widgets.  In the Control Panel you can use the Accounts widget (Control Panel > Users> Accounts)  to access  a specific account and then from the Users tab you can select a user and Edit Roles.  From the Minium site, you can use the Accounts widget on the Account Management page.  
Federico Stendardi, modified 5 Years ago. New Member Posts: 12 Join Date: 2/3/20 Recent Posts
Hi Jeffrey, thank you for the fast reply.
I confirm that using the "accounts widget" to assign roles now the selector work properly, I was confused since I found the "Account scoped" roles into the standard "roles section" in control panel.

Thanks again emoticon