From adddd16cbb4915ab16d05b0039f7179f5b3c8b59 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 15 Aug 2016 21:43:30 +0200 Subject: [PATCH] Add files drop capability for clients --- apps/files_sharing/lib/capabilities.php | 1 + apps/files_sharing/tests/capabilities.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/capabilities.php index 9c66a50980..15935c4631 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/capabilities.php b/apps/files_sharing/tests/capabilities.php index 420fd47ff2..02a4d714f5 100644 --- a/apps/files_sharing/tests/capabilities.php +++ b/apps/files_sharing/tests/capabilities.php @@ -232,6 +232,7 @@ class FilesSharingCapabilitiesTest 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 FilesSharingCapabilitiesTest extends \Test\TestCase { ]; $result = $this->getResults($map); $this->assertFalse($result['public']['upload']); + $this->assertFalse($result['public']['upload_files_drop']); } public function testFederatedSharingIncomming() {