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

[EPIC][Marketplace] Marketplace Permissions #2183

Closed
9 of 12 tasks
spencern opened this issue May 1, 2017 · 10 comments
Closed
9 of 12 tasks

[EPIC][Marketplace] Marketplace Permissions #2183

spencern opened this issue May 1, 2017 · 10 comments
Labels
epic For issues that exist only to track progress on a list of other issues in one place

Comments

@spencern
Copy link
Contributor

spencern commented May 1, 2017

Permission model for Marketplace.

Tasks

Docs

  • Docs explaining what permissions in RC do and the basics of how they work

  • Define default permission levels for each audience

  • Define what each permission grants and what possible side-effects are (for each permission in core, also for each permission in included plugins)

  • Docs explaining best practices for checking permissions

  • Docs explaining best practices for granting permissions (both default and dynamically)

Notes

Possible Permission Groups

  • Marketplace Owner
  • Marketplace admin
  • Shop Owner
  • Shop Admin
  • Affiliate Shop Owner
  • Affiliate Shop Admin
  • Customer
  • Guest

Some marketplace permissions discussion in issue #357

@spencern spencern added epic For issues that exist only to track progress on a list of other issues in one place marketplace labels May 1, 2017
@spencern spencern added this to the Marketplace Permissions milestone May 1, 2017
@spencern
Copy link
Contributor Author

@impactmass @aaronjudd @zenweasel

Can you guys take a look through these issues and let me know where you think there's enough detail and where there needs to be more detail?

@brent-hoover
Copy link
Collaborator

@spencern These seem like they have enough detail but I admit I am still having difficulty wrapping my head around how these all work in tandem with each other (which sort of rights supersede other rights) and how these translate into what a user can and cannot do (e.g. who can see all shops, etc.). I don't know that's really the fault of this doc though. Maybe somebody needs to draw me some pictures or something.

@spencern
Copy link
Contributor Author

I'll see if I can draw some pretty pictures for what I'm thinking here

@impactmass
Copy link
Contributor

impactmass commented Jun 10, 2017

Current thoughts/direction about groups implementation:

  • Building on top of our current way of having permissions on Users/Accounts grouped by shop:
  • Add a "groups" field into Shop collection. It can be modeled like:
{
  _id: 112334,
  name: "A shop",
  groups: {
    "consultant": ["Create", "Edit"],
    "manager": ["Delete"],
  }
}
  • Permissions can then be created (and modified) on "groups" scoped to each shop
  • Put an extra "groups" field on users accounts as well. This will carry the label of all the groups the user belongs to. e.g
{
  _id: 112334,
  emails: [],
  roles: [
    "J8Bhq3uTtdgwZx3rz": []
    "otherShopId": []
  ],
  groups: [
    "J8Bhq3uTtdgwZx3rz": [],
    "otherShopId": ["consultant", "manager"]
  ]
}
  • This will help when permission in a group gets updated. Users with that permission can get updated as well (while also doing update to ensure remaining group previleges are intact.)

@aaronjudd
Copy link
Contributor

@impactmass this is the general direction I was thinking as well. makes sense to me.

@spencern
Copy link
Contributor Author

Looks good to me @impactmass.

@spencern
Copy link
Contributor Author

@impactmass and I just had a discussion on the direction of Permissions and we've decided to focus on the following modifications to the Permissions epic.

  • Each user can belong to exactly one group per shop
  • From the UI, you can assign permissions to users by assigning a user to a group
  • From the UI, you can create 'custom' permissions for users by creating a new group
  • Removing a user from a group should reset their permissions and group back to the basic shopper permissions (guest) and remove them from the shop admin accounts/users interface
  • Changing a users group should add/remove necessary permissions to match the new group the user is in.

@impactmass
Copy link
Contributor

A note here:
_ Items/tickets that are checked and crossed out are done. Items that are checked, but not crossed have two parts to them: server implementation (which is complete), and UI aspect (still in progress).
_ The UI part (mostly around the Accounts part of admin dashboard and currently in Blaze) is being changed to React while also implementing the new design. Progress on that can be tracked on this WIP PR by @rhenshaw56

@rymorgan
Copy link
Contributor

rymorgan commented Jul 13, 2017

Adding this here -- here are the latest screens for permission, made a few small updates mentioned here: #2194

Screens:
Intial User Screen- https://zpl.io/Z162xqi
Edit Permissions Screen - https://zpl.io/nVX8n
Edit Groups - https://zpl.io/Zh8Rdn
Add Group - https://zpl.io/ZTEMLM
Edit Owner - https://zpl.io/15nVaK

@spencern
Copy link
Contributor Author

I'm going to close this as we've completed the essential items, the other items in this list have individual tickets, and it's not on the immediate horizon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic For issues that exist only to track progress on a list of other issues in one place
Projects
None yet
Development

No branches or pull requests

5 participants