chore: remove multi-organization and custom role experiment (#14862)

Closes https://github.com/coder/coder/issues/14704

---------

Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
This commit is contained in:
Steven Masley
2024-09-27 14:06:16 -05:00
committed by GitHub
co-authored by Kayla Washburn-Love
parent 339eebacae
commit 2c8b264d78
32 changed files with 60 additions and 490 deletions
-6
View File
@@ -10308,24 +10308,18 @@ const docTemplate = `{
"enum": [
"example",
"auto-fill-parameters",
"multi-organization",
"custom-roles",
"notifications",
"workspace-usage"
],
"x-enum-comments": {
"ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.",
"ExperimentCustomRoles": "Allows creating runtime custom roles.",
"ExperimentExample": "This isn't used for anything.",
"ExperimentMultiOrganization": "Requires organization context for interactions, default org is assumed.",
"ExperimentNotifications": "Sends notifications via SMTP and webhooks following certain events.",
"ExperimentWorkspaceUsage": "Enables the new workspace usage tracking."
},
"x-enum-varnames": [
"ExperimentExample",
"ExperimentAutoFillParameters",
"ExperimentMultiOrganization",
"ExperimentCustomRoles",
"ExperimentNotifications",
"ExperimentWorkspaceUsage"
]
-6
View File
@@ -9224,24 +9224,18 @@
"enum": [
"example",
"auto-fill-parameters",
"multi-organization",
"custom-roles",
"notifications",
"workspace-usage"
],
"x-enum-comments": {
"ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.",
"ExperimentCustomRoles": "Allows creating runtime custom roles.",
"ExperimentExample": "This isn't used for anything.",
"ExperimentMultiOrganization": "Requires organization context for interactions, default org is assumed.",
"ExperimentNotifications": "Sends notifications via SMTP and webhooks following certain events.",
"ExperimentWorkspaceUsage": "Enables the new workspace usage tracking."
},
"x-enum-varnames": [
"ExperimentExample",
"ExperimentAutoFillParameters",
"ExperimentMultiOrganization",
"ExperimentCustomRoles",
"ExperimentNotifications",
"ExperimentWorkspaceUsage"
]
+3 -16
View File
@@ -20,10 +20,9 @@ func ProvisionerDaemonAuthenticated(r *http.Request) bool {
}
type ExtractProvisionerAuthConfig struct {
DB database.Store
Optional bool
PSK string
MultiOrgEnabled bool
DB database.Store
Optional bool
PSK string
}
func ExtractProvisionerDaemonAuthenticated(opts ExtractProvisionerAuthConfig) func(next http.Handler) http.Handler {
@@ -39,18 +38,6 @@ func ExtractProvisionerDaemonAuthenticated(opts ExtractProvisionerAuthConfig) fu
httpapi.Write(ctx, w, code, response)
}
if !opts.MultiOrgEnabled {
if opts.PSK == "" {
handleOptional(http.StatusUnauthorized, codersdk.Response{
Message: "External provisioner daemons not enabled",
})
return
}
fallbackToPSK(ctx, opts.PSK, next, w, r, handleOptional)
return
}
psk := r.Header.Get(codersdk.ProvisionerDaemonPSK)
key := r.Header.Get(codersdk.ProvisionerDaemonKey)
if key == "" {