Add rbac - #2449
Closed
dehbok wants to merge 6 commits into
Closed
Conversation
Added proposal, tasks. Developed feature. Added tests. Added documentation.
Added proposal, tasks. Developed feature. Added tests. Added documentation.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
|
Hello @dehbok 👋🏻 Thanks for your interest in the project. For this kind of new feature, we normally prefer to start with a discussion before jumping into the implementation. We already have RBAC support for the template on our roadmap, so there's some overlap with work we're planning on our side. For next time, before spending too much time implementing a new feature, please check with someone on the team first to make sure we're aligned. Given this, I'll close this PR but thank you for the effort. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the boolean is_superuser flag with role-based access control (RBAC): three roles (admin, manager, member), five permission codes, and a single enforcement path on both backend and frontend, so future privileged features are one dependency call instead of another superuser check.
What changed
Data model & migration
Backend enforcement
Frontend
Docs — new docs/AUTHORIZATION.md (permission matrix, mechanics, setup/seed/test instructions), one-line pointer from README.md
Tests — pytest fixtures updated + new test_rbac.py; Playwright specs updated + new Access Denied assertion
Housekeeping — .gitignore additions, a real mypy fix in crud.py, formatting cleanup, removed two dead doc links
Breaking: is_superuser is gone from user payloads/schemas — consumers must switch to role and the new permissions array on /users/me.