Repository navigation
feat(people): describe each bound role's permissions and inherited bindings - #80
Merged
Merged
Conversation
…ndings GET /api/internal/people-roles, and the bound role list in POST answers, now give each bound role every permission it grants (`permissions`, through parent roles too) and its own binding followed by the ones it inherits (`bindings`). The backend keeps assignments for People records that aren't linked yet, and this IdP only sees them when the record is linked. With these fields the backend applies peopleRoleChangeProblem's checks itself (bounded delegation and the rules of inherited bindings) before the link. Without them it refuses those assignments (PoliNetworkOrg/backend#105). Refs #78
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
toto04
approved these changes
Oct 30, 2026
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.
Stacked on #73 (base
feat/people-role-api), so its approval stays untouched. Refs #78.Why
PoliNetworkOrg/backend#105 keeps assignments for People records that aren't linked yet. This IdP only sees them when the record is linked, so the backend must apply
peopleRoleChangeProblem's rules itself when they are made (backend#101). Two of those rules need data the backend can't get today: the access snapshot's catalog (#62) only has role keys and names.capo-admininheritsadmin, so it also needspeople:write.Without these fields backend#105 refuses new pending assignments, except to Master Admin.
What changes
rolesinGET /api/internal/people-roles, and in thePOSTanswer, gains two fields:permissions:effectiveRolePermissions, so through parent roles too, sorted;bindings: the role's own binding, then those of the roles it inherits, which is exactly whatpeopleRoleChangeProblemchecks.describePeopleBoundRolesbuilds them, so both endpoints share them. The fields are additive: an older backend ignores them.Tests
capo-admin→bindings: ["capo", "admin"], plus the permissions it inherits.hr-leadgetshr-member's permissions. Unbindable roles stay out.capowithbindings: ["capo", "admin"].Validation:
vp checkpasses.vp test: 351 passed, 124 skipped. The skips are integration suites that need their own databases.pnpm run buildpasses.I also checked #73 (
ce030c5) against every item of #78, and all are covered: migration 0024 is gone and 0023 is aftermain's 0022, no Soci orazureId, thecapokind,idp:people:bind,PEOPLE_RULES, the MCP tool, and the README.