From f1d4341dd7c76f604e51e7c2f0a2d7ad6a8caa28 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sat, 13 Aug 2016 14:00:44 +0200 Subject: [PATCH] Add files drop capability for clients --- apps/files_sharing/lib/Capabilities.php | 1 + apps/files_sharing/tests/CapabilitiesTest.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index 8dde2dafb0..9da6dbbc99 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -69,6 +69,7 @@ class Capabilities implements ICapability { $public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes'; $public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes'; + $public['upload_files_drop'] = $public['upload']; } $res["public"] = $public; diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 0c4a68b997..254f7cdaa7 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -232,6 +232,7 @@ class CapabilitiesTest extends \Test\TestCase { ]; $result = $this->getResults($map); $this->assertTrue($result['public']['upload']); + $this->assertTrue($result['public']['upload_files_drop']); } public function testLinkNoPublicUpload() { @@ -242,6 +243,7 @@ class CapabilitiesTest extends \Test\TestCase { ]; $result = $this->getResults($map); $this->assertFalse($result['public']['upload']); + $this->assertFalse($result['public']['upload_files_drop']); } public function testNoGroupSharing() {