diff options
Diffstat (limited to 'apps/dav/appinfo/v2/publicremote.php')
-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); |