fix: extend content delete authorization to allow administrators alongside owners across all endpoints

This commit is contained in:
2026-06-11 22:40:27 +00:00
parent 9a93debfc9
commit 1e2f304935
14 changed files with 164 additions and 61 deletions
@@ -81,6 +81,13 @@ CONTAINER_ACTIONS: tuple[Action, ...] = (
"start, stop, restart, pause, resume, delete, or sync.",
required=True,
),
arg(
"confirm",
"Required only for action=delete: set true ONLY after the user has explicitly "
"confirmed destroying the instance. Leave unset otherwise; the delete is refused "
"until you pass confirm=true.",
kind="boolean",
),
),
),
Action(
@@ -112,6 +119,13 @@ CONTAINER_ACTIONS: tuple[Action, ...] = (
"Command to run, e.g. 'git clone ... && ls'. Runs in /app already; do not prepend 'cd /app'.",
required=True,
),
arg(
"confirm",
"Required only when the command is destructive (rm, dd, truncate, drop, etc.): set "
"true ONLY after the user has explicitly confirmed. Leave unset otherwise; a "
"destructive command is refused until you pass confirm=true.",
kind="boolean",
),
),
),
Action(