Granting or taking back a server's tools leaves the rest as it was
A tool is seen where every level above that names tools names it (store Effective.AllowsTool). The console and /admin/mcp wrote a level's list as given, so a team that saw its organization's hr.* through having no list was given jira.* and then saw neither; and revoking a level's last server left [] in the store, closed to every tool, shown nowhere. store.GrantTools and RevokeTools now do both screens' work: a level's first list starts from the nearest list above it; taking a server away leaves the others, and a level left naming nothing goes back to no list, or stays closed when a level above names tools, so it opens to nothing it was kept from. GrantTools says which levels above still keep the granted tools out of reach, and both screens say so. The page shows closed levels and member scopes by name, and offers no revoke for a * grant it would not change. The console calls the store instead of keys limits with a list built from what it had loaded, which overwrote changes made since. Found in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7a04248148
commit
44451bacd9
11 files changed
+422
-71
No files matched your search
@@ -51,11 +51,11 @@
|
||||
<button type="submit">{{t "mcp.grant_button"}}</button>
|
||||
</form>
|
||||
{{$name := .Name}}
|
||||
{{range .Grants}}
|
||||
{{range .Grants}}{{if .Revocable}}
|
||||
<form method="post" action="/admin/mcp/{{$name}}/revoke" class="inline" data-confirm="{{t "mcp.confirm_revoke" $name .Label}}">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="scope" value="{{.Scope}}"><input type="hidden" name="id" value="{{.ID}}">
|
||||
<button type="submit">{{t "mcp.revoke" .Label}}</button></form>
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
{{if not .Local}}
|
||||
<h3>{{t "mcp.change"}}</h3>
|
||||
@@ -81,6 +81,8 @@
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}<p class="sub">{{t "mcp.none"}}</p>{{end}}
|
||||
{{if .Closed}}<p class="note">{{t "mcp.closed"}} {{range $i, $c := .Closed}}{{if $i}}, {{end}}{{t (printf "mcp.scope.%s" $c.Scope)}} {{$c.Label}}{{end}}.</p>{{end}}
|
||||
<p class="sub">{{t "mcp.how_grants"}}</p>
|
||||
|
||||
<h2>{{t "mcp.add"}}</h2>
|
||||
<form method="post" action="/admin/mcp/add">
|
||||
|
||||
Reference in new issue
Block a user