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

[Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered #2538

Merged
merged 26 commits into from
Aug 4, 2017

Conversation

impactmass
Copy link
Contributor

@impactmass impactmass commented Jul 7, 2017

Resolves #2186

How to Test:

  • Pull and run this branch. Log in as Marketplace Owner.
  • Setup your email config (if you don't have it)
  • Go to Shop Settings in the dashboard.
  • Open the Invite Owner Form under the marketplace plugin section
  • Fill the form (Use a valid email so you can follow the link that gets sent to register)
  • Follow link in email and on completing the "reset password" form, check that the new account have access to dashboard actions for the new shop.

@impactmass impactmass changed the title [Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered [WIP] [Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered Jul 7, 2017
@spencern spencern requested review from spencern and removed request for spencern July 11, 2017 16:38
@spencern
Copy link
Contributor

This is done more-or-less, but currently UI testing is blocked by #2605

@impactmass impactmass changed the title [WIP] [Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered [Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered Jul 29, 2017
@impactmass
Copy link
Contributor Author

impactmass commented Aug 1, 2017

With the PR fix #2612 I opened for the passwordReset bug, (when merged) the block mentioned above will be removed. But there's another issue I just found. The SortableTable received some updates (I believe via this PR #2597), and that's throwing no data error with Accounts table. I'm taking a look into that too.

@spencern
Copy link
Contributor

spencern commented Aug 1, 2017

In light of the above comment, I'm re-adding [WIP] to this issue.

@spencern spencern changed the title [Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered [WIP][Marketplace] Inviting someone to create a new shop or affiliate shop should automatically grant that user appropriate permissions when registered Aug 1, 2017
* Fix missing component errors and component name reference

* Fix missing component imports and references

* Return use Component. for core comp

* Change componenent ref in resetPassword

* Update Match check to prevent error in cart after password reset

* Add todo comment on the check on cart/merge

* Update to only comment and fix test
@impactmass
Copy link
Contributor Author

@spencern you can test it out now

@spencern
Copy link
Contributor

spencern commented Aug 3, 2017

Seems that i18n isn't working in some places
image

gonna see if I can fix this quickly

@spencern
Copy link
Contributor

spencern commented Aug 3, 2017

Loads with primary shop as "active" after sign-in. I'll see if I can update that as well.

@impactmass
Copy link
Contributor Author

The i18n issue is inconsistent. It shows up sometimes. Sometimes it doesn't. I tried digging in a little too, but no luck

@spencern
Copy link
Contributor

spencern commented Aug 3, 2017

Seems like something is wrong with the cart too

image

On a refresh, twice I've seen the cart icon spin forever

Refreshing the page in this scenario throws the error again and the cart continues to spin. The only solution I've seen is to log out and log back in.

Throws this server error:

Exception from sub Cart id iRN9khFanLydgxGFG WriteError({"code":11000,"index":0,"errmsg":"E11000 duplicate key error collection: meteor.Cart index: c2_userId dup key: { : \"f2z6mjMTHF3eCwsjb\" }","op":{"sessionId":"FyBSLKiJdCFsodehi","userId":"f2z6mjMTHF3eCwsjb","_id":"Xa2L3dsxf9ACmxYte","shopId":"yjgpZxbwBTCpp3cZg","createdAt":"2017-08-03T17:30:13.604Z","workflow":{"status":"new"}}})
    at Object.Future.wait (/Users/sn/.meteor/packages/meteor-tool/.1.5.1.1bs7ixz++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:449:15)
    at [object Object].<anonymous> (packages/meteor.js:213:24)
    at [object Object].MongoConnection.(anonymous function) [as insert] (packages/mongo/mongo_driver.js:778:49)
    at Object.<anonymous> (packages/matb33_collection-hooks.js:395:18)
    at Object.collection.(anonymous function) [as insert] (packages/matb33_collection-hooks.js:146:21)
    at [object Object].insert (packages/mongo/collection.js:526:37)
    at [object Object].Mongo.Collection.(anonymous function) (packages/aldeed_collection2-core.js:232:19)
    at [object Object].Mongo.Collection.(anonymous function) [as insert] (packages/dispatch_run-as-user.js:325:19)
    at [object Object].cartCreateCart (server/methods/core/cart.js:265:44)
    at packages/check.js:129:16
    at [object Object]._.extend.withValue (packages/meteor.js:1126:17)
    at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:128:41)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    at packages/ddp-server/livedata_server.js:1686:15
    at [object Object]._.extend.withValue (packages/meteor.js:1126:17)
    at packages/ddp-server/livedata_server.js:1684:36

Copy link
Contributor

@spencern spencern left a comment

Choose a reason for hiding this comment

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

Issue with cart in loading process forever is a blocker. We need to determine if that's from this PR. If it is we need to fix it here, otherwise we can fix it in the marketplace branch.

We also need to determine if the i18n issues are from this PR

@brent-hoover
Copy link
Collaborator

I think the i18n issue is in development as well: #2593

@aaronjudd aaronjudd requested a review from spencern August 4, 2017 03:25
@aaronjudd aaronjudd assigned aaronjudd and unassigned aaronjudd Aug 4, 2017
@aaronjudd aaronjudd self-requested a review August 4, 2017 03:25
@spencern
Copy link
Contributor

spencern commented Aug 4, 2017

I didn't have a chance to work on the cart creation issue tonight but will jump on it first thing in the am.

@impactmass
Copy link
Contributor Author

Thanks @spencern. I'll also dig into it, maybe I'll find a solution before you're back. (since it's best to get this merged as soon as possible, as other things depend on it)

Copy link
Contributor

@aaronjudd aaronjudd left a comment

Choose a reason for hiding this comment

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

Tested, looks good to me. (I've not seen the cart issue) (i18n is a separate issue as well)

@impactmass
Copy link
Contributor Author

thanks @aaronjudd. Re the cart issue, my last commit fixed it (hence it wasn't happening for you).
I just need to code review this with @spencern now

Copy link
Contributor

@spencern spencern left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@spencern spencern merged commit 31adcf1 into marketplace Aug 4, 2017
@spencern spencern deleted the seun-invite-owner-2186 branch August 4, 2017 18:12
@spencern spencern mentioned this pull request Oct 11, 2017
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.

4 participants