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

Fix Reaction.hasPermission method #298

Merged
merged 2 commits into from
Aug 4, 2020

Conversation

mikoscz
Copy link
Contributor

@mikoscz mikoscz commented Aug 3, 2020

Resolves #issueNumber
Impact: critical
Type: bugfix

Issue

Currently, when we are iterating through the uniqueShopIds we always override the same shopId in theaccountPermissions object. Finally, we can end up with permission for shop A associated under shop B key in accountPermissions object. Which causes thehasPermission returns wrong value.

Solution

I've changed the attribute to which we are saving grouped permissions for the shop. The permissions match the shop now.

willopez and others added 2 commits August 3, 2020 15:55
fix: Update defaultParcelSize only when it exists
Signed-off-by: Michał Staśkiewicz <[email protected]>
@mikoscz mikoscz changed the title Fix has permissions Fix Reaction.hasPermissions method Aug 3, 2020
@mikoscz mikoscz changed the title Fix Reaction.hasPermissions method Fix Reaction.hasPermission method Aug 3, 2020
@kieckhafer kieckhafer self-requested a review August 4, 2020 21:44
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good catch!

@kieckhafer kieckhafer merged commit a4a0f34 into reactioncommerce:trunk Aug 4, 2020
@kieckhafer kieckhafer mentioned this pull request Aug 4, 2020
@mikoscz mikoscz deleted the fix-has-permissions branch August 5, 2020 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants