grandnode / grandnode2

Open-Source eCommerce Platform on .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB & Vue.js
https://grandnode.com/
GNU General Public License v3.0
1.06k stars 435 forks source link

Able to impersonate a customer with Manage Customer - Edit permission. #429

Closed Nikhil13x closed 10 months ago

Nikhil13x commented 10 months ago

Even if the "Admin Area. Allow Customer Impersonation" is disabled for the customer group, the user is able to do impersonation and place order on behalf of other users. On checking the code, the Impersonate method is decorated with [PermissionAuthorizeAction(PermissionActionName.Edit)] only.

So, effectively, if a user has Customer Edit permission, they can impersonate also. And the StandardPermission.AllowCustomerImpersonation doesn't have any relevance