fix: preview a token's mcp access with its superadmin rights

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-12-02 13:23:22 +01:00
co-authored by Claude Opus 5.5
parent a9f8bcf92b
commit c4b63237ea
@@ -378,8 +378,9 @@
// gets, but for a workspace whose role offers scripts and flows as tools: those are served to a
// connection to that workspace alone, which its own URL makes of any sign-in.
const mcpWorkspaceAccess = resource(
() => mcpCreationMode,
async (on) => (on ? await McpOauthService.listMcpWorkspaceAccess({}).catch(() => []) : [])
() => [mcpCreationMode, mcpSuperAdmin] as const,
async ([on, superAdmin]) =>
on ? await McpOauthService.listMcpWorkspaceAccess({ superAdmin }).catch(() => []) : []
)
const mcpAsTools = $derived(
!!mcpWorkspaceAccess.current?.some(