summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-07-28 13:52:31 -0400
committerCorey Hulen <corey@hulen.com>2017-07-28 11:52:31 -0600
commit3c0f082506a68240abd1960cbd0fda22679e12c2 (patch)
tree395a1e9ecdb1eb2c6d7bf7141e3364cc043d9edd /model
parentda6e6ca0bf3f880b60de8d809a7588dfbec3a77a (diff)
downloadchat-3c0f082506a68240abd1960cbd0fda22679e12c2.tar.gz
chat-3c0f082506a68240abd1960cbd0fda22679e12c2.tar.bz2
chat-3c0f082506a68240abd1960cbd0fda22679e12c2.zip
PLT-6924 Added config options to disable file uploads/downloads on mobile (#7049)
Diffstat (limited to 'model')
-rw-r--r--model/config.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index 9daee78c8..a1af59185 100644
--- a/model/config.go
+++ b/model/config.go
@@ -236,6 +236,8 @@ type PasswordSettings struct {
type FileSettings struct {
EnableFileAttachments *bool
+ EnableMobileUpload *bool
+ EnableMobileDownload *bool
MaxFileSize *int64
DriverName string
Directory string
@@ -539,6 +541,16 @@ func (o *Config) SetDefaults() {
*o.FileSettings.EnableFileAttachments = true
}
+ if o.FileSettings.EnableMobileUpload == nil {
+ o.FileSettings.EnableMobileUpload = new(bool)
+ *o.FileSettings.EnableMobileUpload = true
+ }
+
+ if o.FileSettings.EnableMobileDownload == nil {
+ o.FileSettings.EnableMobileDownload = new(bool)
+ *o.FileSettings.EnableMobileDownload = true
+ }
+
if o.FileSettings.MaxFileSize == nil {
o.FileSettings.MaxFileSize = new(int64)
*o.FileSettings.MaxFileSize = 52428800 // 50 MB