summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-03-29 11:58:04 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-03 10:29:32 +0200
commit3cc0d15f92175f01744cef0840e32d9b5657db3b (patch)
tree990eb3f1ee4a0a82a168d35cb4a7e33cecc4d3a9 /lib
parentc191173d5914f77ebac425e315d2b962077bd654 (diff)
downloadnextcloud-server-3cc0d15f92175f01744cef0840e32d9b5657db3b.tar.gz
nextcloud-server-3cc0d15f92175f01744cef0840e32d9b5657db3b.zip
add secure drop functionallity to mail shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 5eea40d3773..79429c44ffa 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -266,7 +266,9 @@ class Manager implements IManager {
// Check that read permissions are always set
// Link shares are allowed to have no read permissions to allow upload to hidden folders
- if ($share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK &&
+ $noReadPermissionRequired = $share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK
+ || $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL;
+ if (!$noReadPermissionRequired &&
($share->getPermissions() & \OCP\Constants::PERMISSION_READ) === 0) {
throw new \InvalidArgumentException('Shares need at least read permissions');
}