Relationships
#4880 workspace.list on a host root refuses non-admin callers signed in through the CLI
Opened by zack · 11/18/2026· Shipped 11/18/2026
admitted() in src/serve/handlers/workspace_handlers.ts holds a caller to the root-admin check when caller.client !== undefined || caller.delegation !== undefined, meaning to catch a caller acting through an integration or a delegation. But serve binds a client to every socket whose token record has one (setConnectionClient in src/serve/handlers/shared.ts), and tokens minted by device login carry direct:cli (direct:dashboard for the dashboard, direct:token for minted tokens). So workspace.list, meant to be open to any caller, refuses every non-admin who signed in with swamp auth server-login. The integration tests miss it because sendRequest binds no client.
Expected: only an integration client (isIntegrationClient from src/domain/access/client.ts) or a delegation is held to the ceiling; direct:* clients reach list.
Fix: use isIntegrationClient(caller.client) || caller.delegation !== undefined, and add a test that binds direct:cli on a non-admin socket and lists.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.