fix(webui): the setup checklist and skill catalogue are system-org only

This commit is contained in:
sam committed 2026-10-11 04:01:46 +11:00
1 parent 1a68b01953
commit ab5f1264ff
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -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 {
+2 -2
View File
@@ -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))