From d77aba98fdb11c0f89ec4724fb7e2b48ade69f69 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Thu, 3 Dec 2026 12:02:36 +0100 Subject: [PATCH] fix: offer the access pen unless every covered workspace's role settles the access Co-Authored-By: Claude Opus 5.5 --- .../(logged)/oauth/mcp_authorize/+page@(root).svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/(root)/(logged)/oauth/mcp_authorize/+page@(root).svelte b/frontend/src/routes/(root)/(logged)/oauth/mcp_authorize/+page@(root).svelte index 042e1a1667..73fa02e2de 100644 --- a/frontend/src/routes/(root)/(logged)/oauth/mcp_authorize/+page@(root).svelte +++ b/frontend/src/routes/(root)/(logged)/oauth/mcp_authorize/+page@(root).svelte @@ -183,8 +183,11 @@ ? workspaceAccess.filter((w) => isTools(w) && !served.includes(w)) : [] ) - // A role limit settles the access; a narrower one the client asked for stays editable. - const editable = $derived(served.every((w) => !w.limited) || access !== 'full') + // Narrowing only ever lowers what each workspace gets, so it is offered unless every role limit + // already settles the access; a narrower one the client asked for stays editable. + const editable = $derived( + served.length === 0 || served.some((w) => !w.limited) || access !== 'full' + ) // One tool list per connection: the picked level's, or what a bound workspace leaves. // A connection bound to a workspace whose role offers scripts and flows as tools lists those. const runnablesHere = $derived(