PLT-6924 Added config options to disable file uploads/downloads on mobile (#7049)

Этот коммит содержится в:
Harrison Healey
2017-07-28 13:52:31 -04:00
коммит произвёл Corey Hulen
родитель da6e6ca0bf
Коммит 3c0f082506
5 изменённых файлов: 77 добавлений и 14 удалений

Просмотреть файл

@@ -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