diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-06-13 00:26:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-13 00:26:47 +0200 |
commit | 470f23c8b95c70fb62bd938d4b43c7edd3910f35 (patch) | |
tree | e91075394f9f9a70ecc69e4ac563564670ba1d8a /lib | |
parent | 4fcc8c9140ea66030001496caf515bb88e85969a (diff) | |
parent | 7f5048e2e54ae1e8c8197b285a78f3098f8e4707 (diff) | |
download | nextcloud-server-470f23c8b95c70fb62bd938d4b43c7edd3910f35.tar.gz nextcloud-server-470f23c8b95c70fb62bd938d4b43c7edd3910f35.zip |
Merge pull request #54 from nextcloud/backport-upload-only-shares
[stable9] Backport files drop feature
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share20/manager.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 9e04d57b289..06d4029bec9 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -233,8 +233,9 @@ class Manager implements IManager { throw new GenericShareException($message_t, $message_t, 404); } - // Check that read permissions are always set - if (($share->getPermissions() & \OCP\Constants::PERMISSION_READ) === 0) { + // Link shares are allowed to have no read permissions to allow upload to hidden folders + if ($share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK && + ($share->getPermissions() & \OCP\Constants::PERMISSION_READ) === 0) { throw new \InvalidArgumentException('Shares need at least read permissions'); } } |