summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index 08510fc44..f99b0454e 100644
--- a/model/config.go
+++ b/model/config.go
@@ -34,6 +34,9 @@ const (
DIRECT_MESSAGE_TEAM = "team"
FAKE_SETTING = "********************************"
+
+ RESTRICT_EMOJI_CREATION_ALL = "all"
+ RESTRICT_EMOJI_CREATION_ADMIN = "system_admin"
)
// should match the values in webapp/i18n/i18n.jsx
@@ -70,6 +73,8 @@ type ServiceSettings struct {
WebsocketSecurePort *int
WebsocketPort *int
WebserverMode *string
+ EnableCustomEmoji *bool
+ RestrictCustomEmojiCreation *string
}
type SSOSettings struct {
@@ -565,6 +570,16 @@ func (o *Config) SetDefaults() {
*o.ServiceSettings.WebserverMode = "regular"
}
+ if o.ServiceSettings.EnableCustomEmoji == nil {
+ o.ServiceSettings.EnableCustomEmoji = new(bool)
+ *o.ServiceSettings.EnableCustomEmoji = true
+ }
+
+ if o.ServiceSettings.RestrictCustomEmojiCreation == nil {
+ o.ServiceSettings.RestrictCustomEmojiCreation = new(string)
+ *o.ServiceSettings.RestrictCustomEmojiCreation = RESTRICT_EMOJI_CREATION_ALL
+ }
+
if o.ComplianceSettings.Enable == nil {
o.ComplianceSettings.Enable = new(bool)
*o.ComplianceSettings.Enable = false