fix: refuse the tools preview to a token withholding superadmin rights, restricted badge after a single access line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-12-03 10:49:29 +01:00
co-authored by Claude Opus 5.5
parent 2efcb9b1d9
commit a67f528425
4 changed files with 33 additions and 21 deletions
@@ -7,7 +7,7 @@ export type WorkspaceAccess = McpWorkspaceAccess['access']
/** What each access level lets the client do. */
export const ACCESS_HINTS: Record<McpAccess, string> = {
full: 'Everything you can do yourself: explore, write, test and deploy drafts, and run.',
full: 'Everything you can do yourself: explore, build, test, deploy and run.',
read_run:
'Explore, and run deployed scripts, flows and agents. The client changes nothing itself; what it runs can.',
read: 'Explore and read. Nothing is run or changed.',
@@ -610,10 +610,10 @@
{#if same}
{@const restricted = restriction(first, access)}
<div class="flex flex-wrap items-center gap-x-1.5">
<span class="text-xs text-primary">{accessLabel(first, access)}</span>
{#if restricted}
<Badge color="gray" small>Restricted</Badge>
{/if}
<span class="text-xs text-primary">{accessLabel(first, access)}</span>
<Tooltip small>{restricted ?? accessHint(first, access)}</Tooltip>
{@render pen()}
</div>
@@ -662,7 +662,9 @@
<div class="flex flex-col gap-1">
{#each leftOut as w (w.id)}
<div class="flex items-center justify-between gap-2">
<span class="text-xs text-emphasis truncate">{w.name}</span>
{#if !one}
<span class="text-xs font-semibold text-emphasis truncate">{w.name}</span>
{/if}
<div class="flex shrink-0 gap-1">
<Button
variant="default"