mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00: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:
@ -72,6 +72,10 @@ type CreateTemplateRequest struct {
|
||||
// DefaultTTLMillis allows optionally specifying the default TTL
|
||||
// for all workspaces created from this template.
|
||||
DefaultTTLMillis *int64 `json:"default_ttl_ms,omitempty"`
|
||||
|
||||
// Allow users to cancel in-progress workspace jobs.
|
||||
// *bool as the default value is "true".
|
||||
AllowUserCancelWorkspaceJobs *bool `json:"allow_user_cancel_workspace_jobs"`
|
||||
}
|
||||
|
||||
// CreateWorkspaceRequest provides options for creating a new workspace.
|
||||
|
Reference in New Issue
Block a user