fix: show a notice when workspace sharing is disabled globally in organization settings (#22580)

This commit is contained in:
Kayla はな
2026-03-04 11:14:52 -07:00
committed by GitHub
parent fda181bb26
commit e35717bc19
12 changed files with 142 additions and 52 deletions
+7 -5
View File
@@ -2851,7 +2851,8 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/setting
```json
{
"sharing_disabled": true
"sharing_disabled": true,
"sharing_globally_disabled": true
}
```
@@ -2881,7 +2882,8 @@ curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/setti
```json
{
"sharing_disabled": true
"sharing_disabled": true,
"sharing_globally_disabled": true
}
```
@@ -2904,9 +2906,9 @@ curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/setti
### Responses
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceSharingSettings](schemas.md#codersdkworkspacesharingsettings) |
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UpdateWorkspaceSharingSettingsRequest](schemas.md#codersdkupdateworkspacesharingsettingsrequest) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
+20 -4
View File
@@ -9809,6 +9809,20 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|--------|--------|----------|--------------|-------------|
| `name` | string | false | | |
## codersdk.UpdateWorkspaceSharingSettingsRequest
```json
{
"sharing_disabled": true
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
|--------------------|---------|----------|--------------|-------------|
| `sharing_disabled` | boolean | false | | |
## codersdk.UpdateWorkspaceTTLRequest
```json
@@ -12278,15 +12292,17 @@ If the schedule is empty, the user will be updated to use the default schedule.|
```json
{
"sharing_disabled": true
"sharing_disabled": true,
"sharing_globally_disabled": true
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
|--------------------|---------|----------|--------------|-------------|
| `sharing_disabled` | boolean | false | | |
| Name | Type | Required | Restrictions | Description |
|-----------------------------|---------|----------|--------------|----------------------------------------------------------------------------------------------------------------------------|
| `sharing_disabled` | boolean | false | | |
| `sharing_globally_disabled` | boolean | false | | Sharing globally disabled is true if sharing has been disabled for this organization because of a deployment-wide setting. |
## codersdk.WorkspaceStatus