mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add server flag to disable user custom quiet hours (#11124)
This commit is contained in:
@@ -390,6 +390,7 @@ type DangerousConfig struct {
|
||||
|
||||
type UserQuietHoursScheduleConfig struct {
|
||||
DefaultSchedule clibase.String `json:"default_schedule" typescript:",notnull"`
|
||||
AllowUserCustom clibase.Bool `json:"allow_user_custom" typescript:",notnull"`
|
||||
// TODO: add WindowDuration and the ability to postpone max_deadline by this
|
||||
// amount
|
||||
// WindowDuration clibase.Duration `json:"window_duration" typescript:",notnull"`
|
||||
@@ -1821,6 +1822,16 @@ Write out the current server config as YAML to stdout.`,
|
||||
Group: &deploymentGroupUserQuietHoursSchedule,
|
||||
YAML: "defaultQuietHoursSchedule",
|
||||
},
|
||||
{
|
||||
Name: "Allow Custom Quiet Hours",
|
||||
Description: "Allow users to set their own quiet hours schedule for workspaces to stop in (depending on template autostop requirement settings). If false, users can't change their quiet hours schedule and the site default is always used.",
|
||||
Flag: "allow-custom-quiet-hours",
|
||||
Env: "CODER_ALLOW_CUSTOM_QUIET_HOURS",
|
||||
Default: "true",
|
||||
Value: &c.UserQuietHoursSchedule.AllowUserCustom,
|
||||
Group: &deploymentGroupUserQuietHoursSchedule,
|
||||
YAML: "allowCustomQuietHours",
|
||||
},
|
||||
{
|
||||
Name: "Web Terminal Renderer",
|
||||
Description: "The renderer to use when opening a web terminal. Valid values are 'canvas', 'webgl', or 'dom'.",
|
||||
|
||||
Reference in New Issue
Block a user