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: pass correct userId when creating a shop #5694

Merged
merged 1 commit into from Oct 8, 2019

Conversation

kieckhafer
Copy link
Member

Replacement PR for #5377

Resolves #5376
Impact: minor
Type: bugfixrefactor

Issue

Primary shopId in accounts collection, gets replaced with newly created shop id, after new shop owner invitation.
new-owner-invitation

This causes missing translation problem.
missing-translation

This causes also problem with updating email settings in Admin UI. (Maybe also other CRUD operations in Admin UI are affected, haven't tested others)

Solution

If we create a new owner user with this new shop, we want to update this new owner user, not the existing "admin" user, in the afterShopCreate appEvent. By passing the second ID field, we can determine if this is the new user, or the existing admin, and update the correct account.

Breaking changes

None

Testing

  1. Create a new shop, and pass in a new owner user ID when creating the shop.
  2. See that the new owners account is updated with the correct data, not the existing admin owners account

Signed-off-by: Erik Kieckhafer <ek@ato.la>
@aldeed aldeed merged commit ba8a7f0 into develop Oct 8, 2019
@aldeed aldeed deleted the fix-kieckhafer-correctUserOnShopCreate branch October 8, 2019 18:56
@willopez willopez mentioned this pull request Oct 9, 2019
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.

None yet

2 participants