feat: add chat sharing foundation (#25041)

This commit is contained in:
Danielle Maywood
2026-05-18 22:32:05 +01:00
committed by GitHub
parent 2732378da2
commit 170a6e1fe9
49 changed files with 1872 additions and 103 deletions
+1
View File
@@ -48,6 +48,7 @@ const (
APIKeyScopeChatCreate APIKeyScope = "chat:create"
APIKeyScopeChatDelete APIKeyScope = "chat:delete"
APIKeyScopeChatRead APIKeyScope = "chat:read"
APIKeyScopeChatShare APIKeyScope = "chat:share"
APIKeyScopeChatUpdate APIKeyScope = "chat:update"
APIKeyScopeCoderAll APIKeyScope = "coder:all"
APIKeyScopeCoderApikeysManageSelf APIKeyScope = "coder:apikeys.manage_self"
+10
View File
@@ -657,6 +657,7 @@ type DeploymentValues struct {
WgtunnelHost serpent.String `json:"wgtunnel_host,omitempty" typescript:",notnull"`
DisableOwnerWorkspaceExec serpent.Bool `json:"disable_owner_workspace_exec,omitempty" typescript:",notnull"`
DisableWorkspaceSharing serpent.Bool `json:"disable_workspace_sharing,omitempty" typescript:",notnull"`
DisableChatSharing serpent.Bool `json:"disable_chat_sharing,omitempty" typescript:",notnull"`
ProxyHealthStatusInterval serpent.Duration `json:"proxy_health_status_interval,omitempty" typescript:",notnull"`
EnableTerraformDebugMode serpent.Bool `json:"enable_terraform_debug_mode,omitempty" typescript:",notnull"`
UserQuietHoursSchedule UserQuietHoursScheduleConfig `json:"user_quiet_hours_schedule,omitempty" typescript:",notnull"`
@@ -3102,6 +3103,15 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
Value: &c.DisableWorkspaceSharing,
YAML: "disableWorkspaceSharing",
},
{
Name: "Disable Chat Sharing",
Description: "Disable chat sharing. Chat ACL checking is disabled and only owners can access their chats.",
Flag: "disable-chat-sharing",
Env: "CODER_DISABLE_CHAT_SHARING",
Value: &c.DisableChatSharing,
YAML: "disableChatSharing",
},
{
Name: "Session Duration",
Description: "The token expiry duration for browser sessions. Sessions may last longer if they are actively making requests, but this functionality can be disabled via --disable-session-expiry-refresh.",
+1 -1
View File
@@ -89,7 +89,7 @@ var RBACResourceActions = map[RBACResource][]RBACAction{
ResourceAssignRole: {ActionAssign, ActionRead, ActionUnassign},
ResourceAuditLog: {ActionCreate, ActionRead},
ResourceBoundaryUsage: {ActionDelete, ActionRead, ActionUpdate},
ResourceChat: {ActionCreate, ActionDelete, ActionRead, ActionUpdate},
ResourceChat: {ActionCreate, ActionDelete, ActionRead, ActionShare, ActionUpdate},
ResourceConnectionLog: {ActionRead, ActionUpdate},
ResourceCryptoKey: {ActionCreate, ActionDelete, ActionRead, ActionUpdate},
ResourceDebugInfo: {ActionRead},