summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-29 14:58:37 -0400
committerChristopher Speller <crspeller@gmail.com>2016-07-29 14:58:37 -0400
commit3f8dda6f5ad676c976fd5ae575a6790fdb505449 (patch)
tree015a739989103ce38481176fd5d55f5f703789cb /utils
parent748fdef1fbded624a786533e8f065b91a047b91c (diff)
downloadchat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.tar.gz
chat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.tar.bz2
chat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.zip
PLT-3633 EE: Add Google and Office365 SSO through OAuth2 (#3660)
* EE: Add Google and Office365 SSO through OAuth2 * Add localization strings * Text tweaks for PLT-3633 * Added sign-up button for Office 365 * Updated some error messages and a bit of licensing * Updated sign-in method section in user settings to include Google and Office365 * Added more localization strings
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go9
-rw-r--r--utils/license.go1
2 files changed, 9 insertions, 1 deletions
diff --git a/utils/config.go b/utils/config.go
index 39dbca4d8..9710684e8 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -238,7 +238,6 @@ func getClientConfig(c *model.Config) map[string]string {
props["RequireEmailVerification"] = strconv.FormatBool(c.EmailSettings.RequireEmailVerification)
props["EnableSignUpWithGitLab"] = strconv.FormatBool(c.GitLabSettings.Enable)
- props["EnableSignUpWithGoogle"] = strconv.FormatBool(c.GoogleSettings.Enable)
props["ShowEmailAddress"] = strconv.FormatBool(c.PrivacySettings.ShowEmailAddress)
@@ -293,6 +292,14 @@ func getClientConfig(c *model.Config) map[string]string {
props["SamlLoginButtonText"] = *c.SamlSettings.LoginButtonText
}
+ if *License.Features.GoogleSSO {
+ props["EnableSignUpWithGoogle"] = strconv.FormatBool(c.GoogleSettings.Enable)
+ }
+
+ if *License.Features.Office365SSO {
+ props["EnableSignUpWithOffice365"] = strconv.FormatBool(c.Office365Settings.Enable)
+ }
+
if *License.Features.PasswordRequirements {
props["PasswordMinimumLength"] = fmt.Sprintf("%v", *c.PasswordSettings.MinimumLength)
props["PasswordRequireLowercase"] = strconv.FormatBool(*c.PasswordSettings.Lowercase)
diff --git a/utils/license.go b/utils/license.go
index 85d25e6ab..971b05912 100644
--- a/utils/license.go
+++ b/utils/license.go
@@ -123,6 +123,7 @@ func getClientLicense(l *model.License) map[string]string {
props["MFA"] = strconv.FormatBool(*l.Features.MFA)
props["SAML"] = strconv.FormatBool(*l.Features.SAML)
props["GoogleSSO"] = strconv.FormatBool(*l.Features.GoogleSSO)
+ props["Office365SSO"] = strconv.FormatBool(*l.Features.Office365SSO)
props["Compliance"] = strconv.FormatBool(*l.Features.Compliance)
props["CustomBrand"] = strconv.FormatBool(*l.Features.CustomBrand)
props["MHPNS"] = strconv.FormatBool(*l.Features.MHPNS)