fix: make environment list accessible to all authenticated users
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m25s
CI / docker (push) Successful in 1m10s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 38s

The list endpoint on EnvironmentAdminController now overrides the
class-level ADMIN guard with isAuthenticated(), so VIEWERs can see
the environment selector. The LayoutShell merges environments from
both the table and agent heartbeats, so the selector always shows
configured environments even when no agents are connected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-08 16:50:31 +02:00
parent b1b7e142bb
commit 1c5ecb02e3
2 changed files with 11 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ public class EnvironmentAdminController {
@GetMapping
@Operation(summary = "List all environments")
@PreAuthorize("isAuthenticated()")
public ResponseEntity<List<Environment>> listEnvironments() {
return ResponseEntity.ok(environmentService.listAll());
}