Skip to content

Commit 8fe1e55

Browse files
mjudeikisclaude
andcommitted
chore: gofmt/goimports the proxy authorization changes
Fix the lint failure: align the membership-gate body constants and drop a stray blank line left by removing the obsolete resolveKCPPath test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0c88f3f commit 8fe1e55

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/server/proxy/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,8 @@ func writeOrgWorkspaceForbidden(w http.ResponseWriter) {
730730

731731
// Response bodies for the membership-gated cluster authorization (Option A).
732732
const (
733-
bareNoClusterBody = `{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"no workspace selected — address /clusters/{id} (resolve the id via the hub REST endpoints, e.g. /api/orgs/{org}/workspaces)","reason":"BadRequest","code":400}`
734-
addressByIDBody = `{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"address workspaces by cluster ID (/clusters/{id}), not by path — resolve the id via /api/orgs/{org}/workspaces/{ws}","reason":"Forbidden","code":403}`
733+
bareNoClusterBody = `{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"no workspace selected — address /clusters/{id} (resolve the id via the hub REST endpoints, e.g. /api/orgs/{org}/workspaces)","reason":"BadRequest","code":400}`
734+
addressByIDBody = `{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"address workspaces by cluster ID (/clusters/{id}), not by path — resolve the id via /api/orgs/{org}/workspaces/{ws}","reason":"Forbidden","code":403}`
735735
clusterAccessDeniedBody = `{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cluster access denied","reason":"Forbidden","code":403}`
736736
)
737737

pkg/server/proxy/proxy_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"testing"
2424
)
2525

26-
2726
// TestIsOrgWorkspacePath covers the structural rule that decides whether
2827
// a kcp logical-cluster path targets an Organization workspace (which the
2928
// proxy rejects per O-10) or a child team Workspace under one (which

0 commit comments

Comments
 (0)