mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Allow user to cancel workspace jobs (#5115)
* Add database column allow_user_cancel_workspace_jobs * Adjust API * site: typesGenerated.ts * Expose template.allow_ in Workspaces API * Fix: site tests * Fix: make fmt/prettier * Fix: enterprise * Database tests * Add CLI tests * Add checkbox * i18n * Logic: block cancelling * Unit tests for conditional cancel * Fix: message * Address PR comment * Address PR comments * Fix: make
This commit is contained in:
@@ -70,10 +70,11 @@ INSERT INTO
|
||||
icon,
|
||||
user_acl,
|
||||
group_acl,
|
||||
display_name
|
||||
display_name,
|
||||
allow_user_cancel_workspace_jobs
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING *;
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) RETURNING *;
|
||||
|
||||
-- name: UpdateTemplateActiveVersionByID :exec
|
||||
UPDATE
|
||||
@@ -102,7 +103,8 @@ SET
|
||||
default_ttl = $4,
|
||||
name = $5,
|
||||
icon = $6,
|
||||
display_name = $7
|
||||
display_name = $7,
|
||||
allow_user_cancel_workspace_jobs = $8
|
||||
WHERE
|
||||
id = $1
|
||||
RETURNING
|
||||
|
||||
Reference in New Issue
Block a user