Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-04-14 15:42:28 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-04-30 09:57:01 +0300
commitbc66bdc0725f51c3ff119e2fc852fccbc6c692aa (patch)
tree5f04a7c824f60aab71c0b7f7ceb0a4a164881fb3 /apps/dav/appinfo/v1/publicwebdav.php
parent80222e6a06d282a2cbd9fdfa0a446316c27278ee (diff)
Add a wrapper to fall back to the share owner on public shares
Else it might happen that we setup a storage that has no real owner and activities do boom etc (looking at you groupfolders and external storages!). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/appinfo/v1/publicwebdav.php')
-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 c50bc134131..556dd35de58 100644
--- a/apps/dav/appinfo/v1/publicwebdav.php
+++ b/apps/dav/appinfo/v1/publicwebdav.php
@@ -82,7 +82,9 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
return new \OC\Files\Storage\Wrapper\PermissionsMask(['storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE]);
});
-
+ \OC\Files\Filesystem::addStorageWrapper('shareOwner', function ($mountPoint, $storage) use ($share) {
+ return new \OCA\DAV\Storage\PublicOwnerWrapper(['storage' => $storage, 'owner' => $share->getShareOwner()]);
+ });
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog);
OC_Util::tearDownFS();