diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-08-02 14:30:52 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-08-12 11:28:03 +0200 |
commit | cb1b366baf75da4c578bc534884eefa7f6b4b3d2 (patch) | |
tree | bdb367d502a6990c39165960a76d3268270162ef /apps/dav/appinfo | |
parent | 1a7acf061e26d938e2162f791afb262dc7c2b90d (diff) | |
download | nextcloud-server-cb1b366baf75da4c578bc534884eefa7f6b4b3d2.tar.gz nextcloud-server-cb1b366baf75da4c578bc534884eefa7f6b4b3d2.zip |
fix(dav): Ensure share properties are also set on public remote endpoint
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/dav/appinfo')
-rw-r--r-- | apps/dav/appinfo/v2/publicremote.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/dav/appinfo/v2/publicremote.php b/apps/dav/appinfo/v2/publicremote.php index 44cf4214505..53e85d556eb 100644 --- a/apps/dav/appinfo/v2/publicremote.php +++ b/apps/dav/appinfo/v2/publicremote.php @@ -10,6 +10,7 @@ use OC\Files\Filesystem; use OC\Files\Storage\Wrapper\PermissionsMask; use OC\Files\View; use OCA\DAV\Storage\PublicOwnerWrapper; +use OCA\DAV\Storage\PublicShareWrapper; use OCA\FederatedFileSharing\FederatedShareProvider; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Mount\IMountManager; @@ -98,6 +99,12 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct return new PublicOwnerWrapper(['storage' => $storage, 'owner' => $share->getShareOwner()]); }); + // Ensure that also private shares have the `getShare` method + /** @psalm-suppress MissingClosureParamType */ + Filesystem::addStorageWrapper('getShare', function ($mountPoint, $storage) use ($share) { + return new PublicShareWrapper(['storage' => $storage, 'share' => $share]); + }, 0); + /** @psalm-suppress InternalMethod */ Filesystem::logWarningWhenAddingStorageWrapper($previousLog); |