aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/appinfo
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-04-14 14:42:28 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-04-30 08:57:01 +0200
commitbc66bdc0725f51c3ff119e2fc852fccbc6c692aa (patch)
tree5f04a7c824f60aab71c0b7f7ceb0a4a164881fb3 /apps/dav/appinfo
parent80222e6a06d282a2cbd9fdfa0a446316c27278ee (diff)
downloadnextcloud-server-bc66bdc0725f51c3ff119e2fc852fccbc6c692aa.tar.gz
nextcloud-server-bc66bdc0725f51c3ff119e2fc852fccbc6c692aa.zip
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')
-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();