[Pkg-owncloud-commits] [owncloud] 93/103: Do not automatically add "update" permission to shared mounts

David Prévot taffit at moszumanska.debian.org
Sun May 31 12:32:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.

commit 609da64c3bc816a1d7f7599b39a693fb9913088b
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Fri Mar 20 12:33:59 2015 +0100

    Do not automatically add "update" permission to shared mounts
    
    In the past it seems the update permission was needed to be able to
    rename shared mounts, but it doesn't seem to be the case any more.
    
    Removing the "update" permission that used to be added automatically
    fixes the read-only permission check when trying to overwrite a
    read-only file over WebDAV.
---
 apps/files_sharing/tests/sharedstorage.php | 3 +--
 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 f840b9b..119f10f 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 b58a8c2..6f456d8 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -1010,7 +1010,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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list