From 15cc4497588537f3f9b81d6f97228fae946fa008 Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Tue, 2 Jan 2018 13:36:31 -0800 Subject: Add color properties to config to white label login buttons (#7826) --- utils/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'utils') diff --git a/utils/config.go b/utils/config.go index 8435c36cf..5dcceba75 100644 --- a/utils/config.go +++ b/utils/config.go @@ -501,6 +501,10 @@ func getClientConfig(c *model.Config) map[string]string { props["EnableEmailBatching"] = strconv.FormatBool(*c.EmailSettings.EnableEmailBatching) props["EmailNotificationContentsType"] = *c.EmailSettings.EmailNotificationContentsType + props["EmailLoginButtonColor"] = *c.EmailSettings.LoginButtonColor + props["EmailLoginButtonBorderColor"] = *c.EmailSettings.LoginButtonBorderColor + props["EmailLoginButtonTextColor"] = *c.EmailSettings.LoginButtonTextColor + props["EnableSignUpWithGitLab"] = strconv.FormatBool(c.GitLabSettings.Enable) props["ShowEmailAddress"] = strconv.FormatBool(c.PrivacySettings.ShowEmailAddress) @@ -562,6 +566,9 @@ func getClientConfig(c *model.Config) map[string]string { props["LdapNicknameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.NicknameAttribute != "") props["LdapFirstNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.FirstNameAttribute != "") props["LdapLastNameAttributeSet"] = strconv.FormatBool(*c.LdapSettings.LastNameAttribute != "") + props["LdapLoginButtonColor"] = *c.LdapSettings.LoginButtonColor + props["LdapLoginButtonBorderColor"] = *c.LdapSettings.LoginButtonBorderColor + props["LdapLoginButtonTextColor"] = *c.LdapSettings.LoginButtonTextColor } if *License.Features.MFA { @@ -579,6 +586,9 @@ func getClientConfig(c *model.Config) map[string]string { props["SamlFirstNameAttributeSet"] = strconv.FormatBool(*c.SamlSettings.FirstNameAttribute != "") props["SamlLastNameAttributeSet"] = strconv.FormatBool(*c.SamlSettings.LastNameAttribute != "") props["SamlNicknameAttributeSet"] = strconv.FormatBool(*c.SamlSettings.NicknameAttribute != "") + props["SamlLoginButtonColor"] = *c.SamlSettings.LoginButtonColor + props["SamlLoginButtonBorderColor"] = *c.SamlSettings.LoginButtonBorderColor + props["SamlLoginButtonTextColor"] = *c.SamlSettings.LoginButtonTextColor } if *License.Features.Cluster { -- cgit v1.2.3-1-g7c22