Repository navigation
app/: user:set-staff revokes admin connections through OAuth::disconnect_resource, not raw SQL (sc-8900) - #157
Merged
Conversation
ndbroadbent
force-pushed
the
staff-revoke-disconnect-resource
branch
from
December 4, 2026 00:19
6fec65d to
89f50cb
Compare
VisualCIdocspring/visualci · build #319 · 361 unchanged · no changes This PR vs base: 16 changed, 20 added since #251, across 5 builds docspring/visualci · journeys · build #317 · 28 unchanged · no changes This PR vs base: 5 changed, 11 added since #248, across 5 builds Updated as builds change. Agents can review with VisualCI's MCP tools. |
ndbroadbent
force-pushed
the
staff-revoke-disconnect-resource
branch
2 times, most recently
from
December 4, 2026 01:54
a8b29c0 to
ba472f1
Compare
…th-provider-laravel 0.1.2's OAuth::disconnect_resource, not SQL against its tables (sc-8900)
ndbroadbent
force-pushed
the
staff-revoke-disconnect-resource
branch
from
December 4, 2026 02:18
ba472f1 to
c7980b6
Compare
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.
Follow-up to #146:
user:set-staff --staff falserevoked a demoted staff member's admin connections with SQL against oauth-provider-laravel's tables (oauth_tokens,oauth_codes,oauth_families), which a schema change in that crate could silently break. It now calls the crate's ownOAuth::disconnect_resource(subject, resource)(new in oauth-provider 0.1.4 / oauth-provider-laravel 0.1.2), which the crate's storage conformance suite covers on PostgreSQL, MySQL and SQLite.revoke_admin_connectionsrevokes per admin resource (/mcp/admin, the only resource that grantsadmin): every admin resource in the OAuth config plusmcp::admin::resource(), deduplicated. The count is still connections ended (Revoked::families), including a code-only connection, so the command's output is unchanged.auth::oauth::is_admin_resourceis public for that.user_set_staff_false_revokes_admin_connections: the same assertions (admin token and pending admin code revoked, the mcp connection kept, "2 admin connections revoked", then "0"). Its fixture rows now carry real resources (the admin token and code on the admin resource, the mcp token on/mcp) instead of an admin-scoped token on/mcp, which the server never issues and which revoking by resource rightly leaves alone.Gates on the build pool (docspring-dev), against a fresh postgres:17 and the existing blob store on 59000:
cargo fmt --all --check,cargo clippy --locked --workspace --all-targets -- -D warnings,cargo test --locked -p visualci-app(staff_commands 7/7, the whole app suite green).Not merging: the coordinator merges under the lock.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.