feat: add organization scope for shared ports (#18314)

This commit is contained in:
ケイラ
2025-06-16 16:15:59 -06:00
committed by GitHub
parent eff2174198
commit 5df70a613d
30 changed files with 1245 additions and 811 deletions

View File

@ -35,12 +35,14 @@ type WorkspaceAppSharingLevel string
const (
WorkspaceAppSharingLevelOwner WorkspaceAppSharingLevel = "owner"
WorkspaceAppSharingLevelAuthenticated WorkspaceAppSharingLevel = "authenticated"
WorkspaceAppSharingLevelOrganization WorkspaceAppSharingLevel = "organization"
WorkspaceAppSharingLevelPublic WorkspaceAppSharingLevel = "public"
)
var MapWorkspaceAppSharingLevels = map[WorkspaceAppSharingLevel]struct{}{
WorkspaceAppSharingLevelOwner: {},
WorkspaceAppSharingLevelAuthenticated: {},
WorkspaceAppSharingLevelOrganization: {},
WorkspaceAppSharingLevelPublic: {},
}
@ -79,7 +81,7 @@ type WorkspaceApp struct {
Subdomain bool `json:"subdomain"`
// SubdomainName is the application domain exposed on the `coder server`.
SubdomainName string `json:"subdomain_name,omitempty"`
SharingLevel WorkspaceAppSharingLevel `json:"sharing_level" enums:"owner,authenticated,public"`
SharingLevel WorkspaceAppSharingLevel `json:"sharing_level" enums:"owner,authenticated,organization,public"`
// Healthcheck specifies the configuration for checking app health.
Healthcheck Healthcheck `json:"healthcheck,omitempty"`
Health WorkspaceAppHealth `json:"health"`