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:
Generated
+20
-16
@@ -1352,6 +1352,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/quiet-hours \
|
||||
"raw_schedule": "string",
|
||||
"time": "string",
|
||||
"timezone": "string",
|
||||
"user_can_set": true,
|
||||
"user_set": true
|
||||
}
|
||||
]
|
||||
@@ -1367,14 +1368,15 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/quiet-hours \
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ----------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» next` | string(date-time) | false | | Next is the next time that the quiet hours window will start. |
|
||||
| `» raw_schedule` | string | false | | |
|
||||
| `» time` | string | false | | Time is the time of day that the quiet hours window starts in the given Timezone each day. |
|
||||
| `» timezone` | string | false | | raw format from the cron expression, UTC if unspecified |
|
||||
| `» user_set` | boolean | false | | User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule. |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ----------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» next` | string(date-time) | false | | Next is the next time that the quiet hours window will start. |
|
||||
| `» raw_schedule` | string | false | | |
|
||||
| `» time` | string | false | | Time is the time of day that the quiet hours window starts in the given Timezone each day. |
|
||||
| `» timezone` | string | false | | raw format from the cron expression, UTC if unspecified |
|
||||
| `» user_can_set` | boolean | false | | User can set is true if the user is allowed to set their own quiet hours schedule. If false, the user cannot set a custom schedule and the default schedule will always be used. |
|
||||
| `» user_set` | boolean | false | | User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule. |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
@@ -1418,6 +1420,7 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/quiet-hours \
|
||||
"raw_schedule": "string",
|
||||
"time": "string",
|
||||
"timezone": "string",
|
||||
"user_can_set": true,
|
||||
"user_set": true
|
||||
}
|
||||
]
|
||||
@@ -1433,14 +1436,15 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/quiet-hours \
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ----------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» next` | string(date-time) | false | | Next is the next time that the quiet hours window will start. |
|
||||
| `» raw_schedule` | string | false | | |
|
||||
| `» time` | string | false | | Time is the time of day that the quiet hours window starts in the given Timezone each day. |
|
||||
| `» timezone` | string | false | | raw format from the cron expression, UTC if unspecified |
|
||||
| `» user_set` | boolean | false | | User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule. |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ----------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» next` | string(date-time) | false | | Next is the next time that the quiet hours window will start. |
|
||||
| `» raw_schedule` | string | false | | |
|
||||
| `» time` | string | false | | Time is the time of day that the quiet hours window starts in the given Timezone each day. |
|
||||
| `» timezone` | string | false | | raw format from the cron expression, UTC if unspecified |
|
||||
| `» user_can_set` | boolean | false | | User can set is true if the user is allowed to set their own quiet hours schedule. If false, the user cannot set a custom schedule and the default schedule will always be used. |
|
||||
| `» user_set` | boolean | false | | User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule. |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
|
||||
Generated
+1
@@ -394,6 +394,7 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
|
||||
},
|
||||
"update_check": true,
|
||||
"user_quiet_hours_schedule": {
|
||||
"allow_user_custom": true,
|
||||
"default_schedule": "string"
|
||||
},
|
||||
"verbose": true,
|
||||
|
||||
Generated
+16
-10
@@ -2324,6 +2324,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
},
|
||||
"update_check": true,
|
||||
"user_quiet_hours_schedule": {
|
||||
"allow_user_custom": true,
|
||||
"default_schedule": "string"
|
||||
},
|
||||
"verbose": true,
|
||||
@@ -2700,6 +2701,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
},
|
||||
"update_check": true,
|
||||
"user_quiet_hours_schedule": {
|
||||
"allow_user_custom": true,
|
||||
"default_schedule": "string"
|
||||
},
|
||||
"verbose": true,
|
||||
@@ -5659,15 +5661,17 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
|
||||
```json
|
||||
{
|
||||
"allow_user_custom": true,
|
||||
"default_schedule": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------ | ------ | -------- | ------------ | ----------- |
|
||||
| `default_schedule` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------- | ------- | -------- | ------------ | ----------- |
|
||||
| `allow_user_custom` | boolean | false | | |
|
||||
| `default_schedule` | string | false | | |
|
||||
|
||||
## codersdk.UserQuietHoursScheduleResponse
|
||||
|
||||
@@ -5677,19 +5681,21 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"raw_schedule": "string",
|
||||
"time": "string",
|
||||
"timezone": "string",
|
||||
"user_can_set": true,
|
||||
"user_set": true
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `next` | string | false | | Next is the next time that the quiet hours window will start. |
|
||||
| `raw_schedule` | string | false | | |
|
||||
| `time` | string | false | | Time is the time of day that the quiet hours window starts in the given Timezone each day. |
|
||||
| `timezone` | string | false | | raw format from the cron expression, UTC if unspecified |
|
||||
| `user_set` | boolean | false | | User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule. |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `next` | string | false | | Next is the next time that the quiet hours window will start. |
|
||||
| `raw_schedule` | string | false | | |
|
||||
| `time` | string | false | | Time is the time of day that the quiet hours window starts in the given Timezone each day. |
|
||||
| `timezone` | string | false | | raw format from the cron expression, UTC if unspecified |
|
||||
| `user_can_set` | boolean | false | | User can set is true if the user is allowed to set their own quiet hours schedule. If false, the user cannot set a custom schedule and the default schedule will always be used. |
|
||||
| `user_set` | boolean | false | | User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule. |
|
||||
|
||||
## codersdk.UserStatus
|
||||
|
||||
|
||||
Generated
+11
@@ -31,6 +31,17 @@ coder server [flags]
|
||||
|
||||
The URL that users will use to access the Coder deployment.
|
||||
|
||||
### --allow-custom-quiet-hours
|
||||
|
||||
| | |
|
||||
| ----------- | --------------------------------------------------------- |
|
||||
| Type | <code>bool</code> |
|
||||
| Environment | <code>$CODER_ALLOW_CUSTOM_QUIET_HOURS</code> |
|
||||
| YAML | <code>userQuietHoursSchedule.allowCustomQuietHours</code> |
|
||||
| Default | <code>true</code> |
|
||||
|
||||
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.
|
||||
|
||||
### --block-direct-connections
|
||||
|
||||
| | |
|
||||
|
||||
Reference in New Issue
Block a user