aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/publicwebdav.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-04-22 16:19:52 +0200
committerRobin Appelman <icewind@owncloud.com>2015-04-22 16:19:52 +0200
commit2adb79c794f0306dccf0007567a28e2e3d8c34fb (patch)
tree1ea6f15f621faffa83402a9e2ceb9f7331469673 /apps/files_sharing/publicwebdav.php
parent03b7f1d015e8cd622ddd3a5a07f1afa31a293229 (diff)
downloadnextcloud-server-2adb79c794f0306dccf0007567a28e2e3d8c34fb.tar.gz
nextcloud-server-2adb79c794f0306dccf0007567a28e2e3d8c34fb.zip
resolve reshares in public webdav
Diffstat (limited to 'apps/files_sharing/publicwebdav.php')
-rw-r--r--apps/files_sharing/publicwebdav.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php
index 3a961f5d757..6e1583eb4fe 100644
--- a/apps/files_sharing/publicwebdav.php
+++ b/apps/files_sharing/publicwebdav.php
@@ -56,9 +56,10 @@ $server->addPlugin(new \OC\Connector\Sabre\ExceptionLoggerPlugin('webdav', \OC::
// wait with registering these until auth is handled and the filesystem is setup
$server->on('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) {