]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix permissions of mountpoints 4623/head
authorRobin Appelman <robin@icewind.nl>
Mon, 1 May 2017 13:37:02 +0000 (15:37 +0200)
committerRobin Appelman <robin@icewind.nl>
Mon, 1 May 2017 13:37:02 +0000 (15:37 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/View.php

index 5e581feba6e689ff7880b8dacab31d884e68823b..c10b5b693b75f8dcb4bb5ecee7c8e674bb2c6cee 100644 (file)
@@ -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));