diff options
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 0134e1a34..13e795170 100644 --- a/model/config.go +++ b/model/config.go @@ -49,6 +49,14 @@ const ( RESTRICT_EMOJI_CREATION_ADMIN = "admin" RESTRICT_EMOJI_CREATION_SYSTEM_ADMIN = "system_admin" + PERMISSIONS_DELETE_POST_ALL = "all" + PERMISSIONS_DELETE_POST_TEAM_ADMIN = "team_admin" + PERMISSIONS_DELETE_POST_SYSTEM_ADMIN = "system_admin" + + ALLOW_EDIT_POST_ALWAYS = "always" + ALLOW_EDIT_POST_NEVER = "never" + ALLOW_EDIT_POST_TIME_LIMIT = "time_limit" + EMAIL_BATCHING_BUFFER_SIZE = 256 EMAIL_BATCHING_INTERVAL = 30 @@ -92,6 +100,9 @@ type ServiceSettings struct { WebserverMode *string EnableCustomEmoji *bool RestrictCustomEmojiCreation *string + RestrictPostDelete *string + AllowEditPost *string + PostEditTimeLimit *int } type ClusterSettings struct { @@ -827,6 +838,21 @@ func (o *Config) SetDefaults() { *o.ServiceSettings.RestrictCustomEmojiCreation = RESTRICT_EMOJI_CREATION_ALL } + if o.ServiceSettings.RestrictPostDelete == nil { + o.ServiceSettings.RestrictPostDelete = new(string) + *o.ServiceSettings.RestrictPostDelete = PERMISSIONS_DELETE_POST_ALL + } + + if o.ServiceSettings.AllowEditPost == nil { + o.ServiceSettings.AllowEditPost = new(string) + *o.ServiceSettings.AllowEditPost = ALLOW_EDIT_POST_TIME_LIMIT + } + + if o.ServiceSettings.PostEditTimeLimit == nil { + o.ServiceSettings.PostEditTimeLimit = new(int) + *o.ServiceSettings.PostEditTimeLimit = 300 + } + if o.ClusterSettings.InterNodeListenAddress == nil { o.ClusterSettings.InterNodeListenAddress = new(string) *o.ClusterSettings.InterNodeListenAddress = ":8075" |