aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-07-20 11:24:52 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-07-20 11:24:52 +0200
commitae8a3ce085dd746adad250feb4742e7b1a148d21 (patch)
tree5c92f6a09764d383348314e2ee4aeb6054f64227
parent5e468c0bbaf6b9838a1b92bcb04836dccff7b532 (diff)
downloadnextcloud-server-ae8a3ce085dd746adad250feb4742e7b1a148d21.tar.gz
nextcloud-server-ae8a3ce085dd746adad250feb4742e7b1a148d21.zip
fix preview for public links
in case a user is already logged in on the same server from which the public link comes from, we need to setup the owners file system in order to show the preview Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
-rw-r--r--apps/dav/appinfo/v1/publicwebdav.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php
index 3ef1c2e62a5..37fcebe605c 100644
--- a/apps/dav/appinfo/v1/publicwebdav.php
+++ b/apps/dav/appinfo/v1/publicwebdav.php
@@ -79,10 +79,12 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE));
});
+
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog);
+ OC_Util::tearDownFS();
OC_Util::setupFS($owner);
- $ownerView = \OC\Files\Filesystem::getView();
+ $ownerView = new \OC\Files\View('/'. $owner . '/files');
$path = $ownerView->getPath($fileId);
$fileInfo = $ownerView->getFileInfo($path);
$linkCheckPlugin->setFileInfo($fileInfo);