summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go1
-rw-r--r--utils/config_test.go10
-rw-r--r--utils/license.go1
3 files changed, 12 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go
index 6a973fe1c..c0c7ecc20 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -442,6 +442,7 @@ func getClientConfig(c *model.Config) map[string]string {
props["EnableSignInWithUsername"] = strconv.FormatBool(*c.EmailSettings.EnableSignInWithUsername)
props["RequireEmailVerification"] = strconv.FormatBool(c.EmailSettings.RequireEmailVerification)
props["EnableEmailBatching"] = strconv.FormatBool(*c.EmailSettings.EnableEmailBatching)
+ props["EmailNotificationContentsType"] = *c.EmailSettings.EmailNotificationContentsType
props["EnableSignUpWithGitLab"] = strconv.FormatBool(c.GitLabSettings.Enable)
diff --git a/utils/config_test.go b/utils/config_test.go
index a6bfa4e82..e49073b8e 100644
--- a/utils/config_test.go
+++ b/utils/config_test.go
@@ -277,3 +277,13 @@ func TestValidateLocales(t *testing.T) {
t.Fatal("Should have returned an error validating AvailableLocales")
}
}
+
+func TestGetClientConfig(t *testing.T) {
+ TranslationsPreInit()
+ LoadConfig("config.json")
+
+ configMap := getClientConfig(Cfg)
+ if configMap["EmailNotificationContentsType"] != *Cfg.EmailSettings.EmailNotificationContentsType {
+ t.Fatal("EmailSettings.EmailNotificationContentsType not exposed to client config")
+ }
+}
diff --git a/utils/license.go b/utils/license.go
index 3647b51cc..e28a43e29 100644
--- a/utils/license.go
+++ b/utils/license.go
@@ -186,6 +186,7 @@ func getClientLicense(l *model.License) map[string]string {
props["Email"] = l.Customer.Email
props["Company"] = l.Customer.Company
props["PhoneNumber"] = l.Customer.PhoneNumber
+ props["EmailNotificationContents"] = strconv.FormatBool(*l.Features.EmailNotificationContents)
}
return props