diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-06-07 12:28:02 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-06-09 15:15:17 +0200 |
commit | bb54ab0db8bfa1ea62bfa2404cb084a9a68d6e20 (patch) | |
tree | 8127443d4c554ebcd1401ce8227408038f8717e2 /lib/private | |
parent | fc3ad7d5f7acb018329b22d5120c03cd07feecd6 (diff) | |
download | nextcloud-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.php | 5 |
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'); } |