fix: correct permission checks for compose loadServices and env editing

- Change compose.loadServices permission from service:create to service:read
  since loading services from a compose file is a read-only operation
- Add saveEnvironment endpoint to compose router with envVars:write permission
- Update show-environment.tsx to use saveEnvironment mutations instead of
  generic update mutations for all service types (compose, databases)

Closes #4052
This commit is contained in:
Mauricio Siu
2026-04-05 13:52:53 -06:00
parent f700017ccf
commit 91b44720ef
3 changed files with 42 additions and 9 deletions

View File

@@ -225,6 +225,13 @@ export const apiUpdateCompose = createSchema
})
.omit({ serverId: true });
export const apiSaveEnvironmentVariablesCompose = createSchema
.pick({
composeId: true,
env: true,
})
.required();
export const apiRandomizeCompose = createSchema
.pick({
composeId: true,