diff options
author | Tejay Cardon <tejay.cardon@gmail.com> | 2017-08-08 08:15:20 -0600 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-08-08 10:15:20 -0400 |
commit | 2105b10ccdff58a6d1986776c37fc179249f369f (patch) | |
tree | 2f9192a951ce39c3c2dceaf14d48fb0b756d331f /model | |
parent | 7683e751ab7c8dee28e8ec8f2dcf3edd1048fe29 (diff) | |
download | chat-2105b10ccdff58a6d1986776c37fc179249f369f.tar.gz chat-2105b10ccdff58a6d1986776c37fc179249f369f.tar.bz2 chat-2105b10ccdff58a6d1986776c37fc179249f369f.zip |
FIXES PLT-6648 Add support for Server Side Encryption on S3 (#6467)
Help from Jason Blais on wording
Update storage_settings.jsx
Update en.json
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 6 | ||||
-rw-r--r-- | model/config_test.go | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 55fe8490b..1717d61a0 100644 --- a/model/config.go +++ b/model/config.go @@ -262,6 +262,7 @@ type FileSettings struct { AmazonS3Endpoint string AmazonS3SSL *bool AmazonS3SignV2 *bool + AmazonS3SSE *bool } type EmailSettings struct { @@ -551,6 +552,11 @@ func (o *Config) SetDefaults() { // Signature v2 is not enabled by default. } + if o.FileSettings.AmazonS3SSE == nil { + o.FileSettings.AmazonS3SSE = new(bool) + *o.FileSettings.AmazonS3SSE = false // Not Encrypted by default. + } + if o.FileSettings.EnableFileAttachments == nil { o.FileSettings.EnableFileAttachments = new(bool) *o.FileSettings.EnableFileAttachments = true diff --git a/model/config_test.go b/model/config_test.go index 1a944710f..f10e2d0cd 100644 --- a/model/config_test.go +++ b/model/config_test.go @@ -24,3 +24,12 @@ func TestConfigDefaultEmailNotificationContentsType(t *testing.T) { t.Fatal("EmailSettings.EmailNotificationContentsType should default to 'full'") } } + +func TestConfigDefaultFileSettingsS3SSE(t *testing.T) { + c1 := Config{} + c1.SetDefaults() + + if *c1.FileSettings.AmazonS3SSE != false { + t.Fatal("FileSettings.AmazonS3SSE should default to false") + } +} |