summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-06-07 12:28:02 +0200
committerLukas Reschke <lukas@owncloud.com>2016-06-09 15:15:17 +0200
commitbb54ab0db8bfa1ea62bfa2404cb084a9a68d6e20 (patch)
tree8127443d4c554ebcd1401ce8227408038f8717e2 /lib/private
parentfc3ad7d5f7acb018329b22d5120c03cd07feecd6 (diff)
downloadnextcloud-server-bb54ab0db8bfa1ea62bfa2404cb084a9a68d6e20.tar.gz
nextcloud-server-bb54ab0db8bfa1ea62bfa2404cb084a9a68d6e20.zip
add hide file list option
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Share20/Manager.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index ceaaa58cf6e..5921bbc44c8 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -239,8 +239,11 @@ 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');
}