summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-05-04 08:41:54 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-05-04 08:41:54 +0200
commite5960fe2606d6b84e558ae5b6f888ff3a24e4a05 (patch)
treef9a091cbbf4cdae423f0273c0f104730d2bfdc84 /lib
parentb04102aab364a62c7a7c3f5cbae9fd0d672842f5 (diff)
downloadnextcloud-server-e5960fe2606d6b84e558ae5b6f888ff3a24e4a05.tar.gz
nextcloud-server-e5960fe2606d6b84e558ae5b6f888ff3a24e4a05.zip
Revert "Revert "fix permissions of mountpoints""
This reverts commit 70a0e9c2d39532f9de6c6e108ef7eaaebb856ed6. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-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));