summaryrefslogtreecommitdiffstats
path: root/model/license.go
diff options
context:
space:
mode:
authorDavid Meza <dmeza@users.noreply.github.com>2017-09-05 19:28:46 -0500
committerChris <ccbrown112@gmail.com>2017-09-05 19:28:46 -0500
commit1605fa5102e7d5d76a02456130097d3ab82c2a2b (patch)
tree9ac27174b4eff176d3b466acbb036d1fa52b96e3 /model/license.go
parent7cee7b3342afa4b6845b0574f90c9fdc586c3c34 (diff)
downloadchat-1605fa5102e7d5d76a02456130097d3ab82c2a2b.tar.gz
chat-1605fa5102e7d5d76a02456130097d3ab82c2a2b.tar.bz2
chat-1605fa5102e7d5d76a02456130097d3ab82c2a2b.zip
Configs for themes in `Display Settings`: hide themes options, hide custom themes, specific list of themes (#7173)
* Add configuration to enable or disable choosing themes in Display Settings. Only for Licensed servers. * Add configuration to enable or disable choosing custom themes in Display Settings. Only for Licensed servers. * Add configuration to enable or disable a specific list of themes to choose in Display Settings. Only for Licensed servers. * Added config value and logic for "DefaultTheme" * Fix problem with undefined values when the server is not licensed
Diffstat (limited to 'model/license.go')
-rw-r--r--model/license.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/model/license.go b/model/license.go
index ea1089723..d6fbcb937 100644
--- a/model/license.go
+++ b/model/license.go
@@ -51,6 +51,7 @@ type Features struct {
PasswordRequirements *bool `json:"password_requirements"`
Elasticsearch *bool `json:"elastic_search"`
Announcement *bool `json:"announcement"`
+ ThemeManagement *bool `json:"theme_management"`
EmailNotificationContents *bool `json:"email_notification_contents"`
// after we enabled more features for webrtc we'll need to control them with this
@@ -152,6 +153,11 @@ func (f *Features) SetDefaults() {
*f.Announcement = true
}
+ if f.ThemeManagement == nil {
+ f.ThemeManagement = new(bool)
+ *f.ThemeManagement = true
+ }
+
if f.EmailNotificationContents == nil {
f.EmailNotificationContents = new(bool)
*f.EmailNotificationContents = *f.FutureFeatures