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:
Marcin Tojek
2022-11-21 11:43:53 +01:00
committed by GitHub
parent 5fa3fdeca0
commit e86539db11
23 changed files with 336 additions and 162 deletions
@@ -0,0 +1 @@
ALTER TABLE templates DROP COLUMN allow_user_cancel_workspace_jobs;
@@ -0,0 +1,4 @@
ALTER TABLE templates ADD COLUMN allow_user_cancel_workspace_jobs boolean NOT NULL DEFAULT true;
COMMENT ON COLUMN templates.allow_user_cancel_workspace_jobs
IS 'Allow users to cancel in-progress workspace jobs.';