diff options
author | Robin Appelman <robin@icewind.nl> | 2017-05-01 15:37:02 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-05-01 15:37:02 +0200 |
commit | 75b3b72d89e9ff45a616c54e6f1b5101260f33c4 (patch) | |
tree | d18b09402008a954f592bedfd64891b0c6b5b490 | |
parent | 18b5e2fced13f0e7a00910029eeaad60ca8c78e6 (diff) | |
download | nextcloud-server-75b3b72d89e9ff45a616c54e6f1b5101260f33c4.tar.gz nextcloud-server-75b3b72d89e9ff45a616c54e6f1b5101260f33c4.zip |
fix permissions of mountpoints
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/Files/View.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 5e581feba6e..c10b5b693b7 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1351,8 +1351,12 @@ class View { return false; } - if ($mount instanceof MoveableMount && $internalPath === '') { - $data['permissions'] |= \OCP\Constants::PERMISSION_DELETE; + if ($internalPath === '') { + if ($mount instanceof MoveableMount) { + $data['permissions'] = $data['permissions'] | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE; + } else { + $data['permissions'] = $data['permissions'] & (\OCP\Constants::PERMISSION_ALL - (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE)); + } } $owner = $this->getUserObjectForOwner($storage->getOwner($internalPath)); |