fix(web): move tool permissions into the connector Manage menu

"Tools" as an inline link next to the connection chips read as decoration and
did not say what it did. It is now a "Tool permissions" item in the same
Manage menu as connect and disconnect, which is where you already look to
change something about a connection.

The menu was admin-only (isAdmin && !personalOnly), so putting the entry there
unchanged would have hidden it from non-admins and from custom MCP servers —
backwards, since tool permissions apply to your own connection. The menu now
renders whenever you have something to manage, with the workspace connect and
disconnect entry still gated on admin. Non-admins previously got a bare
"Disconnect" pill; that action moved into the menu rather than disappearing.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sreeram Sreedhar 2026-07-31 16:32:20 +05:30
parent 2600b946ea
commit f801afc991

View file

@ -124,6 +124,8 @@ function AppCard({
const anyConnected = userConnected || orgConnected
const showOrgChip = !personalOnly && (orgConnected || isAdmin)
const adminMenu = isAdmin && !personalOnly
// Tool permissions apply to your own connection, so the menu is not admin-only.
const showMenu = adminMenu || userConnected
return (
<div className="flex min-w-0 flex-col justify-between gap-3 rounded-xl bg-[#14161A] p-4 shadow-[inset_2.42px_2.42px_4.263px_rgba(11,15,21,0.7)]">
@ -165,19 +167,8 @@ function AppCard({
) : null}
</>
)}
{toolsHref && anyConnected ? (
<Link
href={toolsHref}
className={cn(
dmSans125ClassName(),
"shrink-0 text-[12px] font-medium text-[#8B929E] underline-offset-2 transition-colors hover:text-[#FAFAFA] hover:underline",
)}
>
Tools
</Link>
) : null}
</div>
{adminMenu ? (
{showMenu ? (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button
@ -212,6 +203,11 @@ function AppCard({
background: "linear-gradient(180deg, #0A0E14 0%, #05070A 100%)",
}}
>
{toolsHref && userConnected ? (
<DropdownMenuItem asChild className={menuItemClass}>
<Link href={toolsHref}>Tool permissions</Link>
</DropdownMenuItem>
) : null}
<DropdownMenuItem
className={menuItemClass}
onClick={() =>
@ -220,23 +216,20 @@ function AppCard({
>
{userConnected ? "Disconnect my account" : "Connect my account"}
</DropdownMenuItem>
<DropdownMenuItem
className={menuItemClass}
onClick={() =>
orgConnected ? onDisconnect(true) : onConnect(true)
}
>
{orgConnected
? "Disconnect workspace"
: "Connect for workspace"}
</DropdownMenuItem>
{adminMenu ? (
<DropdownMenuItem
className={menuItemClass}
onClick={() =>
orgConnected ? onDisconnect(true) : onConnect(true)
}
>
{orgConnected
? "Disconnect workspace"
: "Connect for workspace"}
</DropdownMenuItem>
) : null}
</DropdownMenuContent>
</DropdownMenu>
) : userConnected ? (
<PillButton onClick={() => onDisconnect(false)} disabled={busy}>
{busy && <Loader2 className="size-3.5 animate-spin" />}
Disconnect
</PillButton>
) : personalOnly ? null : (
<PillButton onClick={() => onConnect(false)} disabled={busy}>
{busy && <Loader2 className="size-3.5 animate-spin" />}