From df076b457a1a0ba0e13027b7115ba0bebcc002aa Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 9 Jan 2019 12:19:56 -0500 Subject: [PATCH] Move MFA enforcement setting into limited client config (#10077) --- utils/config.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/utils/config.go b/utils/config.go index 6b392b22db..e8529f6af3 100644 --- a/utils/config.go +++ b/utils/config.go @@ -550,10 +550,6 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L props["LdapLastNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.LastNameAttribute != "") } - if *license.Features.MFA { - props["EnforceMultifactorAuthentication"] = strconv.FormatBool(*c.ServiceSettings.EnforceMultifactorAuthentication) - } - if *license.Features.Compliance { props["EnableCompliance"] = strconv.FormatBool(*c.ComplianceSettings.Enable) props["EnableMobileFileDownload"] = strconv.FormatBool(*c.FileSettings.EnableMobileDownload) @@ -668,7 +664,6 @@ func GenerateLimitedClientConfig(c *model.Config, diagnosticId string, license * props["LdapLoginButtonColor"] = "" props["LdapLoginButtonBorderColor"] = "" props["LdapLoginButtonTextColor"] = "" - props["EnableMultifactorAuthentication"] = "false" props["EnableSaml"] = "false" props["SamlLoginButtonText"] = "" props["SamlLoginButtonColor"] = "" @@ -710,6 +705,10 @@ func GenerateLimitedClientConfig(c *model.Config, diagnosticId string, license * props["EnableCustomTermsOfService"] = strconv.FormatBool(*c.SupportSettings.CustomTermsOfServiceEnabled) props["CustomTermsOfServiceReAcceptancePeriod"] = strconv.FormatInt(int64(*c.SupportSettings.CustomTermsOfServiceReAcceptancePeriod), 10) } + + if *license.Features.MFA { + props["EnforceMultifactorAuthentication"] = strconv.FormatBool(*c.ServiceSettings.EnforceMultifactorAuthentication) + } } return props