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

Fixed per-role permissions #45

Open
bkabrda opened this issue May 25, 2016 · 1 comment
Open

Fixed per-role permissions #45

bkabrda opened this issue May 25, 2016 · 1 comment

Comments

@bkabrda
Copy link

bkabrda commented May 25, 2016

Hi, this is more of a question than a bug (potentially it may become RFE):
I have an application where I want to have:

  • users
  • possibly multiple roles for each user
  • "fixed" set of permissions (possibly growing in time) that I can assign/unassign to/from certain roles

Made-up example:

  • There is a developer role and a manager role
  • All developers have "change-code" permission and "create-new-repository" permission
  • All managers have "manipulate-team-members" permission
  • After a while, I decide that developers are creating too many repos, so I want to move the permission from developers to managers - just by changing permissions that are associated to these roles in DB, I don't want to touch application code

AFAICS this is not supported approach at this time, cause it would need adding a permission model with M:N relation to role model. I think this should be pretty easy to actually add to my application while still using flask-principal, but I wanted to ask if there's a preferred/recommended way of doing this or if you have some plans in this direction (or if I'm just missing something and doing everything wrong ;)). Thanks!

@madslundgaard
Copy link

Hi @bkabrda,
Død you find a good way to implement. I am facing similar a challenge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants