Repository navigation
feat(auth): Grants resource for the access-grant store - #107
Merged
Merged
Conversation
Wraps the /auth/v1/grants/ administration surface (#883/#886): list (the who-can-administer-what matrix, with filters as query params), check, grant, revoke, and delete-by-id. Rows are plain dicts (the server's AccessGrant resource; no campus model exists for it). campus-cli#50's grant commands build on this.
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.
Adds
campus.auth.grants— the SDK pass-through for the/auth/v1/grants/administration surface that epic nyjc-computing/campus#883 shipped (routes incampus/auth/routes/grants.py):list(grantee_type=, grantee_id=, resource_type=, resource_id=)→{"grants": [...]}— the "who can administer what" matrix query; unfiltered lists require the operatorcheck(...) -> bool—GET /grants/checkgrant(...) -> row—POST /grants/(vault rows carrybits+resource_id; management rows carrylevel; never downgrades — revoke first)revoke(...) -> row | None—POST /grants/revokedelete(grant_id)—DELETE /grants/{id}Rows are plain dicts (the server's AccessGrant resource; no
campus.modelclass exists for it). First consumer: campus-cli#50'scampus grantcommands.Tests: 8 contract tests in
tests/unit/test_auth_grants.py(paths, query params, exact bodies, delete-verb path without trailing slash). Full suite: 298 passed.