Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow to assign "Vendor" and "Administrator" roles to a customer #3232

Closed
AndreiMaz opened this issue Aug 13, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@AndreiMaz
Copy link
Member

AndreiMaz commented Aug 13, 2018

nopCommerce version: 4.10

Steps to reproduce the problem: We encountered a bug in nopCommerce 4.10. By default in nopCommerce you cannot assign Vendor and Administrator roles to a customer but in 4.10 when I edit admin user and assign vendor role to it and then save, it saves successfully. But after this, it does not let me go inside admin part in nopCommerce.. I had to go to database and remove vendor role association from admin user and then login again..

Source: https://www.nopcommerce.com/boards/t/52224/nopcommerce-410-bug-fixes-and-improvements.aspx?p=6#210410

The issue is that how we implemented new navigation properties in 4.10. We invoke "customer.IsVendor()" and "customer.IsAdmin()" methods but actually "CustomerCustomerRoleMappings" property is not syncronized with "CustomerRoles" ones (cached). We jsut have to reset "_customerRoles" variable when we update "CustomerCustomerRoleMappings" property

@AndreiMaz AndreiMaz added the bug label Aug 13, 2018
@AndreiMaz AndreiMaz added this to the Version 4.20 milestone Aug 13, 2018
@AndreiMaz AndreiMaz assigned RomanovM and RuS984 and unassigned RomanovM Aug 13, 2018
RuS984 pushed a commit that referenced this issue Aug 24, 2018
@RuS984
Copy link
Contributor

RuS984 commented Aug 24, 2018

Close #3232

@RuS984 RuS984 closed this as completed Aug 24, 2018
@RuS984 RuS984 reopened this Sep 3, 2018
RuS984 pushed a commit that referenced this issue Sep 5, 2018
@RuS984
Copy link
Contributor

RuS984 commented Sep 5, 2018

Close #3232

@RuS984 RuS984 closed this as completed Sep 5, 2018
RuS984 pushed a commit that referenced this issue Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants