From 328eea4bc3699d10f76d9ba39768181f85bd9b24 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 7 Jun 2019 16:10:02 +0100 Subject: [PATCH] MM-15730: Send down the Position attribute mapping in client config. (#11018) This is required to know when to disable the Position field in the User Settings UI modal. --- config/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/client.go b/config/client.go index 5c13142fad..a853bee4dd 100644 --- a/config/client.go +++ b/config/client.go @@ -94,12 +94,14 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L props["LdapNicknameAttributeSet"] = "false" props["LdapFirstNameAttributeSet"] = "false" props["LdapLastNameAttributeSet"] = "false" + props["LdapPositionAttributeSet"] = "false" props["EnableCompliance"] = "false" props["EnableMobileFileDownload"] = "true" props["EnableMobileFileUpload"] = "true" props["SamlFirstNameAttributeSet"] = "false" props["SamlLastNameAttributeSet"] = "false" props["SamlNicknameAttributeSet"] = "false" + props["SamlPositionAttributeSet"] = "false" props["EnableCluster"] = "false" props["EnableMetrics"] = "false" props["PasswordMinimumLength"] = "0" @@ -136,6 +138,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L props["LdapNicknameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.NicknameAttribute != "") props["LdapFirstNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.FirstNameAttribute != "") props["LdapLastNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.LastNameAttribute != "") + props["LdapPositionAttributeSet"] = strconv.FormatBool(*c.LdapSettings.PositionAttribute != "") } if *license.Features.Compliance { @@ -148,6 +151,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L props["SamlFirstNameAttributeSet"] = strconv.FormatBool(*c.SamlSettings.FirstNameAttribute != "") props["SamlLastNameAttributeSet"] = strconv.FormatBool(*c.SamlSettings.LastNameAttribute != "") props["SamlNicknameAttributeSet"] = strconv.FormatBool(*c.SamlSettings.NicknameAttribute != "") + props["SamlPositionAttributeSet"] = strconv.FormatBool(*c.SamlSettings.PositionAttribute != "") // do this under the correct licensed feature props["ExperimentalClientSideCertEnable"] = strconv.FormatBool(*c.ExperimentalSettings.ClientSideCertEnable)