From 49481caf6db89b0853626ac52ab5f786a6887179 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 4 May 2017 15:45:19 -0400 Subject: PLT-6262 Add config setting to disable file attachments (#6301) * Add config setting to disable file attachments * Add unit tests * Updating UI for no attachments (#6312) * Update UI text on file upload System Console setting (#6313) * Update storage_settings.jsx * Update en.json --- api4/file_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'api4/file_test.go') diff --git a/api4/file_test.go b/api4/file_test.go index 9124e893b..e48aabffc 100644 --- a/api4/file_test.go +++ b/api4/file_test.go @@ -102,6 +102,15 @@ func TestUploadFile(t *testing.T) { _, resp = th.SystemAdminClient.UploadFile(data, channel.Id, "test.png") CheckNoError(t, resp) + + enableFileAttachments := *utils.Cfg.FileSettings.EnableFileAttachments + defer func() { + *utils.Cfg.FileSettings.EnableFileAttachments = enableFileAttachments + }() + *utils.Cfg.FileSettings.EnableFileAttachments = false + + _, resp = th.SystemAdminClient.UploadFile(data, channel.Id, "test.png") + CheckNotImplementedStatus(t, resp) } func TestGetFile(t *testing.T) { -- cgit v1.2.3-1-g7c22