diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-03-20 14:06:55 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-03-20 14:06:55 +0100 |
commit | 7ea5c47b3ca38e71fdca6ff66e06522bfcfbbd40 (patch) | |
tree | cfe9be0e36fb19cdaca3e9de21e5eee498dcaee5 | |
parent | b0cd1b097573aef8bc3e988f0ba68a730919e9dd (diff) | |
parent | 67160e086130f01fe73d9198f81a4c3f08f3d9c8 (diff) | |
download | nextcloud-server-7ea5c47b3ca38e71fdca6ff66e06522bfcfbbd40.tar.gz nextcloud-server-7ea5c47b3ca38e71fdca6ff66e06522bfcfbbd40.zip |
Merge pull request #15063 from owncloud/share-readonlyfile-permissions
Do not automatically add "update" permission to shared mounts
-rw-r--r-- | apps/files_sharing/tests/sharedstorage.php | 3 | ||||
-rw-r--r-- | lib/private/files/view.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/sharedstorage.php b/apps/files_sharing/tests/sharedstorage.php index 2959b9aacfb..46f75b488b5 100644 --- a/apps/files_sharing/tests/sharedstorage.php +++ b/apps/files_sharing/tests/sharedstorage.php @@ -182,9 +182,8 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase { // for the share root we expect: // the shared permissions (1) // the delete permission (8), to enable unshare - // the update permission (2), to allow renaming of the mount point $rootInfo = \OC\Files\Filesystem::getFileInfo($this->folder); - $this->assertSame(11, $rootInfo->getPermissions()); + $this->assertSame(9, $rootInfo->getPermissions()); // for the file within the shared folder we expect: // the shared permissions (1) diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 53e13396621..c95e0545810 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1133,7 +1133,7 @@ class View { } if ($mount instanceof MoveableMount && $internalPath === '') { - $data['permissions'] |= \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE; + $data['permissions'] |= \OCP\Constants::PERMISSION_DELETE; } $data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data); |