summaryrefslogtreecommitdiffstats
path: root/utils/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/config.go')
-rw-r--r--utils/config.go24
1 files changed, 10 insertions, 14 deletions
diff --git a/utils/config.go b/utils/config.go
index b7bd15e..6441677 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -639,17 +639,15 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
props["PasswordRequireSymbol"] = strconv.FormatBool(*c.PasswordSettings.Symbol)
props["CustomUrlSchemes"] = strings.Join(*c.DisplaySettings.CustomUrlSchemes, ",")
+ props["LdapNicknameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.NicknameAttribute != "")
+ props["LdapFirstNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.FirstNameAttribute != "")
+ props["LdapLastNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.LastNameAttribute != "")
+
if license != nil {
props["ExperimentalHideTownSquareinLHS"] = strconv.FormatBool(*c.TeamSettings.ExperimentalHideTownSquareinLHS)
props["ExperimentalTownSquareIsReadOnly"] = strconv.FormatBool(*c.TeamSettings.ExperimentalTownSquareIsReadOnly)
props["ExperimentalEnableAuthenticationTransfer"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableAuthenticationTransfer)
- if *license.Features.LDAP {
- props["LdapNicknameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.NicknameAttribute != "")
- props["LdapFirstNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.FirstNameAttribute != "")
- props["LdapLastNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.LastNameAttribute != "")
- }
-
if *license.Features.MFA {
props["EnforceMultifactorAuthentication"] = strconv.FormatBool(*c.ServiceSettings.EnforceMultifactorAuthentication)
}
@@ -783,15 +781,13 @@ func GenerateLimitedClientConfig(c *model.Config, diagnosticId string, license *
props["CustomBrandText"] = *c.TeamSettings.CustomBrandText
props["CustomDescriptionText"] = *c.TeamSettings.CustomDescriptionText
- if license != nil {
- if *license.Features.LDAP {
- props["EnableLdap"] = strconv.FormatBool(*c.LdapSettings.Enable)
- props["LdapLoginFieldName"] = *c.LdapSettings.LoginFieldName
- props["LdapLoginButtonColor"] = *c.LdapSettings.LoginButtonColor
- props["LdapLoginButtonBorderColor"] = *c.LdapSettings.LoginButtonBorderColor
- props["LdapLoginButtonTextColor"] = *c.LdapSettings.LoginButtonTextColor
- }
+ props["EnableLdap"] = strconv.FormatBool(*c.LdapSettings.Enable)
+ props["LdapLoginFieldName"] = *c.LdapSettings.LoginFieldName
+ props["LdapLoginButtonColor"] = *c.LdapSettings.LoginButtonColor
+ props["LdapLoginButtonBorderColor"] = *c.LdapSettings.LoginButtonBorderColor
+ props["LdapLoginButtonTextColor"] = *c.LdapSettings.LoginButtonTextColor
+ if license != nil {
if *license.Features.MFA {
props["EnableMultifactorAuthentication"] = strconv.FormatBool(*c.ServiceSettings.EnableMultifactorAuthentication)
}