diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-05-15 12:43:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-15 12:43:36 -0500 |
commit | 75c437a96a845e149f0054d28d779d6f486d27fb (patch) | |
tree | 4f827935df5347a9b8ac8b1bd8babc4dab4728a2 | |
parent | ad0d0b0916fef2826803c0641371efa0c7e91d64 (diff) | |
parent | 91dfff5db4465c63b72daf3918f0750aa81e82e6 (diff) | |
download | nextcloud-server-75c437a96a845e149f0054d28d779d6f486d27fb.tar.gz nextcloud-server-75c437a96a845e149f0054d28d779d6f486d27fb.zip |
Merge pull request #4883 from nextcloud/revert-4685-fix_4683
Revert "fix permissions of mountpoints - take 2"
-rw-r--r-- | apps/files_sharing/tests/SharedStorageTest.php | 7 | ||||
-rw-r--r-- | lib/private/Files/View.php | 8 |
2 files changed, 5 insertions, 10 deletions
diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index 195016c47d1..7d007cb6414 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -207,11 +207,10 @@ class SharedStorageTest extends TestCase { $this->assertTrue(\OC\Files\Filesystem::is_dir($this->folder)); // for the share root we expect: - // the read permissions - // the delete permission, to enable unshare - // the update permission, to enable moving the share + // the read permissions (1) + // the delete permission (8), to enable unshare $rootInfo = \OC\Files\Filesystem::getFileInfo($this->folder); - $this->assertSame(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE, $rootInfo->getPermissions()); + $this->assertSame(9, $rootInfo->getPermissions()); // for the file within the shared folder we expect: // the read permissions (1) diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 18942d05acf..0e22415e6f7 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1355,12 +1355,8 @@ class View { return false; } - 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)); - } + if ($mount instanceof MoveableMount && $internalPath === '') { + $data['permissions'] |= \OCP\Constants::PERMISSION_DELETE; } $owner = $this->getUserObjectForOwner($storage->getOwner($internalPath)); |