Repository navigation
feat(rbac): support inherited permission overrides - #68
Open
viganogabriele wants to merge 2 commits into
Open
viganogabriele wants to merge 2 commits into
viganogabriele wants to merge 2 commits into
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Inherited permissions now appear checked in the role editor. Each permission shows its source: Inherited (with parent names), Direct, or Implied. Unchecking an inherited permission creates an amber Override; Use inherited restores the parent behavior. Direct permissions can still be added and removed normally.
Overrides persist as explicit exclusions on role_permission and apply after inheritance and permission implications. They propagate to descendants without changing parents or siblings; independently held roles still combine their grants. Delegation checks use directly held roles to preserve override boundaries and prevent privilege escalation. Essential read access required by managed write/assign permissions remains enforced.
Includes migration 0022, which defaults existing assignments to granted, plus resolution, draft interaction, persistence, audit, and delegation regression coverage.
Role member counts, member lists and assignment search now follow role inheritance as well. A person assigned Trusted Admin also counts under Admin, once even when multiple inheritance paths or a direct assignment overlap. Inherited members show their source roles; removing a direct assignment preserves membership still inherited from another role. Counts follow manually assigned roles, while managed memberships remain determined by identity evidence.
Validation:
vp check; full suite with disposable PostgreSQL (372 passed, 66 skipped— remaining opt-in integrations were not configured);vp run build, including server bundle checks. Browser verified inherited preselection, direct/inherited labels, exclusion and save/reload, inheritance reset, and direct grant removal/reassignment.Browser also verified that a Trusted Admin member appears in the Admin list and both role counts. PostgreSQL regressions cover transitive/diamond inheritance, deduplication, cycle termination and counts after assignment/parent changes.