diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2018-10-27 10:20:02 +0200 |
---|---|---|
committer | Alexander Sulfrian <asulfrian@zedat.fu-berlin.de> | 2020-01-07 18:41:37 +0100 |
commit | 9db4666a657bf137b371b9163a60e9c818ea31f3 (patch) | |
tree | d9dd69aea7e9443b46387aae5bfb4efbd41a65c2 /utils/config.go | |
parent | 937b6480d534b3051cadf4a892a9aa210bec579a (diff) | |
download | chat-spline.tar.gz chat-spline.tar.bz2 chat-spline.zip |
ldap: Add own ldap authenticationspline
Diffstat (limited to 'utils/config.go')
-rw-r--r-- | utils/config.go | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/utils/config.go b/utils/config.go index b7bd15e61..644167710 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) } |