[Pkg-owncloud-commits] [owncloud] 27/103: resolve reshares in public webdav

David Prévot taffit at moszumanska.debian.org
Sun May 31 12:32:34 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 f6df1546f424d549df501dad9651d06272fde485
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Apr 22 16:19:52 2015 +0200

    resolve reshares in public webdav
---
 apps/files_sharing/publicwebdav.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php
index 240891f..8133a3a 100644
--- a/apps/files_sharing/publicwebdav.php
+++ b/apps/files_sharing/publicwebdav.php
@@ -40,9 +40,10 @@ $server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav'));
 // wait with registering these until auth is handled and the filesystem is setup
 $server->subscribeEvent('beforeMethod', function () use ($server, $objectTree, $authBackend) {
 	$share = $authBackend->getShare();
-	$owner = $share['uid_owner'];
-	$isWritable = $share['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
-	$fileId = $share['file_source'];
+	$rootShare = \OCP\Share::resolveReShare($share);
+	$owner = $rootShare['uid_owner'];
+	$isWritable = $rootShare['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
+	$fileId = $rootShare['file_source'];
 
 	if (!$isWritable) {
 		\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {

-- 
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