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] Feature - getShopId server side #2435

Closed
wants to merge 16 commits into from

Conversation

spencern
Copy link
Contributor

Please review and merge #2429 if it has not been merged yet first. Creating separate PRs and branches here even though they build off of each other to keep concerns separated.

This PR accomplishes the following

  1. When an administrative user selects a shop, saves the selected shop as a user preference in the database as a user preference using Reaction.setUserPreference
  2. Adds a server method Reaction.getUserPreference that permits us to retrieve user preferences on the server
  3. Changes Reaction.getShopId on the server to accept a userId param and return the users activeShopId if it's set
  4. Changes all Collection permit/deny security code to use the active shop
  5. On the client, select the active shop on app load if it's available.

This PR should be reviewed in depth for security vulnerabilities

@spencern spencern requested review from aaronjudd and jshimko June 14, 2017 18:59
@spencern
Copy link
Contributor Author

@lcampanis You may want to review this as well as this is the point where we're starting to move away from some of the getSellerShopId functionality.

I still like the idea of using the concept of "my shop" or sellerShop for some functionality, but at the core I think we need more flexibility from the getShopId method than it was providing. This PR starts giving us the flexibility in the core that we need for marketplace implementations.

@spencern
Copy link
Contributor Author

Closing in favor of #2429 which has these changes and more pulled in

@spencern spencern closed this Jun 23, 2017
@spencern spencern deleted the spencer-serverside-getshopid branch June 23, 2017 19:03
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.

1 participant