[MM-48727] Restore license checks for SSO in self-hosted deployments (#21781)
* Revert license checks for sso integrations - Revert license check changes for open-id connect options - Add option to integrate openid-connect for all cloud offerings * Move enterprise SSO features back to enterprise repository
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c3c81cb3d6
Коммит
03a5b4a288
@@ -303,11 +303,11 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
|
||||
props["SamlLoginButtonColor"] = ""
|
||||
props["SamlLoginButtonBorderColor"] = ""
|
||||
props["SamlLoginButtonTextColor"] = ""
|
||||
props["EnableSignUpWithOpenId"] = strconv.FormatBool(*c.OpenIdSettings.Enable)
|
||||
props["OpenIdButtonColor"] = *c.OpenIdSettings.ButtonColor
|
||||
props["OpenIdButtonText"] = *c.OpenIdSettings.ButtonText
|
||||
props["EnableSignUpWithGoogle"] = strconv.FormatBool(*c.GoogleSettings.Enable)
|
||||
props["EnableSignUpWithOffice365"] = strconv.FormatBool(*c.Office365Settings.Enable)
|
||||
props["EnableSignUpWithGoogle"] = "false"
|
||||
props["EnableSignUpWithOffice365"] = "false"
|
||||
props["EnableSignUpWithOpenId"] = "false"
|
||||
props["OpenIdButtonText"] = ""
|
||||
props["OpenIdButtonColor"] = ""
|
||||
props["CWSURL"] = ""
|
||||
props["EnableCustomBrand"] = strconv.FormatBool(*c.TeamSettings.EnableCustomBrand)
|
||||
props["CustomBrandText"] = *c.TeamSettings.CustomBrandText
|
||||
@@ -342,6 +342,27 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
|
||||
if *license.Features.MFA {
|
||||
props["EnforceMultifactorAuthentication"] = strconv.FormatBool(*c.ServiceSettings.EnforceMultifactorAuthentication)
|
||||
}
|
||||
|
||||
if license.IsCloud() {
|
||||
// MM-48727: enable SSO options for free cloud - not in self hosted
|
||||
*license.Features.GoogleOAuth = true
|
||||
*license.Features.Office365OAuth = true
|
||||
*license.Features.OpenId = true
|
||||
}
|
||||
|
||||
if *license.Features.GoogleOAuth {
|
||||
props["EnableSignUpWithGoogle"] = strconv.FormatBool(*c.GoogleSettings.Enable)
|
||||
}
|
||||
|
||||
if *license.Features.Office365OAuth {
|
||||
props["EnableSignUpWithOffice365"] = strconv.FormatBool(*c.Office365Settings.Enable)
|
||||
}
|
||||
|
||||
if *license.Features.OpenId {
|
||||
props["EnableSignUpWithOpenId"] = strconv.FormatBool(*c.OpenIdSettings.Enable)
|
||||
props["OpenIdButtonColor"] = *c.OpenIdSettings.ButtonColor
|
||||
props["OpenIdButtonText"] = *c.OpenIdSettings.ButtonText
|
||||
}
|
||||
}
|
||||
|
||||
for key, value := range c.FeatureFlags.ToMap() {
|
||||
|
||||
Ссылка в новой задаче
Block a user