summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go24
-rw-r--r--utils/license.go4
2 files changed, 12 insertions, 16 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)
}
diff --git a/utils/license.go b/utils/license.go
index b84ef7007..c9784dfe4 100644
--- a/utils/license.go
+++ b/utils/license.go
@@ -124,12 +124,12 @@ func GetLicenseFileLocation(fileLocation string) string {
func GetClientLicense(l *model.License) map[string]string {
props := make(map[string]string)
- props["IsLicensed"] = strconv.FormatBool(l != nil)
+ props["IsLicensed"] = strconv.FormatBool(true)
+ props["LDAP"] = strconv.FormatBool(true)
if l != nil {
props["Id"] = l.Id
props["Users"] = strconv.Itoa(*l.Features.Users)
- props["LDAP"] = strconv.FormatBool(*l.Features.LDAP)
props["MFA"] = strconv.FormatBool(*l.Features.MFA)
props["SAML"] = strconv.FormatBool(*l.Features.SAML)
props["Cluster"] = strconv.FormatBool(*l.Features.Cluster)