summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go8
-rw-r--r--utils/license.go1
2 files changed, 9 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go
index c0771933d..b5a26d298 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -538,6 +538,14 @@ func getClientConfig(c *model.Config) map[string]string {
props["ElasticSearchEnableIndexing"] = strconv.FormatBool(*c.ElasticSearchSettings.EnableIndexing)
props["ElasticSearchEnableSearching"] = strconv.FormatBool(*c.ElasticSearchSettings.EnableSearching)
}
+
+ if *License.Features.Announcement {
+ props["EnableBanner"] = strconv.FormatBool(*c.AnnouncementSettings.EnableBanner)
+ props["BannerText"] = *c.AnnouncementSettings.BannerText
+ props["BannerColor"] = *c.AnnouncementSettings.BannerColor
+ props["BannerTextColor"] = *c.AnnouncementSettings.BannerTextColor
+ props["AllowBannerDismissal"] = strconv.FormatBool(*c.AnnouncementSettings.AllowBannerDismissal)
+ }
}
return props
diff --git a/utils/license.go b/utils/license.go
index 03a9d7ab3..3647b51cc 100644
--- a/utils/license.go
+++ b/utils/license.go
@@ -178,6 +178,7 @@ func getClientLicense(l *model.License) map[string]string {
props["CustomBrand"] = strconv.FormatBool(*l.Features.CustomBrand)
props["MHPNS"] = strconv.FormatBool(*l.Features.MHPNS)
props["PasswordRequirements"] = strconv.FormatBool(*l.Features.PasswordRequirements)
+ props["Announcement"] = strconv.FormatBool(*l.Features.Announcement)
props["IssuedAt"] = strconv.FormatInt(l.IssuedAt, 10)
props["StartsAt"] = strconv.FormatInt(l.StartsAt, 10)
props["ExpiresAt"] = strconv.FormatInt(l.ExpiresAt, 10)