From ab5f1264ff3c44f133e373ec6dfca2400c1ef094 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 11 Oct 2026 04:01:46 +1100 Subject: [PATCH] fix(webui): the setup checklist and skill catalogue are system-org only --- internal/webui/instance_only.go | 3 ++- internal/webui/server.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/webui/instance_only.go b/internal/webui/instance_only.go index 78f5178ac..419ce1bfb 100644 --- a/internal/webui/instance_only.go +++ b/internal/webui/instance_only.go @@ -8,7 +8,8 @@ import ( ) // instanceViewer reports whether r may see instance-wide detail: process -// health, service logs, the loaded config and every identity on the instance. +// health, service logs, the loaded config, the setup checklist read from it, +// the skill catalogue and every identity on the instance. // Only the system org operates the instance; a request with no principal is // an install without the access chain, whose single operator is that org. func instanceViewer(r *http.Request) bool { diff --git a/internal/webui/server.go b/internal/webui/server.go index 7eac7fedf..36fe146a4 100644 --- a/internal/webui/server.go +++ b/internal/webui/server.go @@ -235,11 +235,11 @@ func (s *Server) Broadcast(e events.Event) { func (s *Server) registerCoreRoutes(mux *http.ServeMux) { mux.HandleFunc("GET /api/summary", s.handleSummary) - mux.HandleFunc("GET /api/setup", s.handleSetup) + mux.HandleFunc("GET /api/setup", instanceOnly(s.handleSetup)) mux.HandleFunc("GET /api/workflows", s.handleWorkflows) mux.HandleFunc("PUT /api/workflows/{id}/enabled", s.handleWorkflowEnabled) mux.HandleFunc("POST /api/work-requests", s.handleWorkRequest) - mux.HandleFunc("GET /api/skills", s.handleSkills) + mux.HandleFunc("GET /api/skills", instanceOnly(s.handleSkills)) mux.HandleFunc("GET /api/curators", instanceOnly(s.handleCurators)) mux.HandleFunc("GET /api/captures", s.handleCaptures) mux.HandleFunc("GET /api/channels", instanceOnly(s.handleChannels))