feat(enterprise): implement organization "disable workspace sharing" option (#21376)

Adds a per-organization setting to disable workspace sharing. When enabled,
all existing workspace ACLs in the organization are cleared and the workspace
ACL mutation API endpoints return `403 Forbidden`.

This complements the existing site-wide `--disable-workspace-sharing` flag by
providing more granular control at the organization level.

Closes https://github.com/coder/internal/issues/1073 (part 2)

---------

Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
This commit is contained in:
George K
2026-01-14 09:47:50 -08:00
committed by GitHub
co-authored by Steven Masley
parent 7d5cd06f83
commit 0712faef4f
30 changed files with 1134 additions and 3 deletions
+1
View File
@@ -24,3 +24,4 @@ coder organizations settings set
| [<code>group-sync</code>](./organizations_settings_set_group-sync.md) | Group sync settings to sync groups from an IdP. |
| [<code>role-sync</code>](./organizations_settings_set_role-sync.md) | Role sync settings to sync organization roles from an IdP. |
| [<code>organization-sync</code>](./organizations_settings_set_organization-sync.md) | Organization sync settings to sync organization memberships from an IdP. |
| [<code>workspace-sharing</code>](./organizations_settings_set_workspace-sharing.md) | Workspace sharing settings for the organization. |
@@ -0,0 +1,14 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# organizations settings set workspace-sharing
Workspace sharing settings for the organization.
Aliases:
* workspacesharing
## Usage
```console
coder organizations settings set workspace-sharing
```
+1
View File
@@ -24,3 +24,4 @@ coder organizations settings show
| [<code>group-sync</code>](./organizations_settings_show_group-sync.md) | Group sync settings to sync groups from an IdP. |
| [<code>role-sync</code>](./organizations_settings_show_role-sync.md) | Role sync settings to sync organization roles from an IdP. |
| [<code>organization-sync</code>](./organizations_settings_show_organization-sync.md) | Organization sync settings to sync organization memberships from an IdP. |
| [<code>workspace-sharing</code>](./organizations_settings_show_workspace-sharing.md) | Workspace sharing settings for the organization. |
@@ -0,0 +1,14 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# organizations settings show workspace-sharing
Workspace sharing settings for the organization.
Aliases:
* workspacesharing
## Usage
```console
coder organizations settings show workspace-sharing
```