summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-05-01 15:37:02 +0200
committerRobin Appelman <robin@icewind.nl>2017-05-01 15:37:02 +0200
commit75b3b72d89e9ff45a616c54e6f1b5101260f33c4 (patch)
treed18b09402008a954f592bedfd64891b0c6b5b490
parent18b5e2fced13f0e7a00910029eeaad60ca8c78e6 (diff)
downloadnextcloud-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.php8
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));