T20: connectors screen (services, disconnect, MCP clients) #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t20-connectors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
T20: Connectors screen
Stacked on #18 (
t19-app-shell) → … → #1. Merge those first.What
/connectors. Disconnect deletes the encrypted tokens after a confirm prompt.audviacheck_token(servicesFromAudience). A service that's off shows "not enabled for this FIT app" with the fix: an admin enables it atauth.fit.cvut.cz/manager, then the user signs in again. Live on the dev account: Usermap ✔, Sirius ✔, Marast ✔, Grades ✘, which matches the 403 we saw in T7./oauth/revoke, best effort). For a PAT, the page says to delete it in GitLab too.workers-oauth-providergrants (name and approval date, with all pages followed), each with a Revoke button. A loading failure shows an error, never "none connected".src/server/connections-manage.ts), both with session + same-originOrigincheck:POST /api/connections/disconnect(provider=fit|gitlab).POST /api/mcp-clients/revoke(grantId). Only the user's own grants can be revoked: ownership is checked across all pages, andrevokeGrant(grantId, userId)is keyed by user.checkTokennow exposesaudience.revokeGitlabTokenwas added.Verified
bun run lint && bun run typecheck && bun run test: 241 tests, 10 of them new for management. They cover the service map (liveaudshape, unknown → null); disconnect for FIT, GitLab OAuth (revoke called, even when the network fails) and PAT (no GitLab call); cross-origin, anonymous and invalid provider; listing MCP clients; revoking only your own grants; pagination for list and ownership; bad or cross-origin revokes.servicesFromAudienceon your real token gives{ usermap: true, sirius: true, grades: false, marast: true }.bun run dev+ curl: anonymous/connectors→ 307 to login; anonymous disconnect and revoke → login redirect.Astra review (gpt-6-astra)
It confirmed that session-derived ownership, the Origin checks and token-free loader data are sound.
Fixed:
🤖 Generated with Claude Code