diff options
Diffstat (limited to 'apps/files_sharing/lib/AppInfo/Application.php')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index db2175c3445..3e95c738df8 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -28,6 +28,7 @@ namespace OCA\Files_Sharing\AppInfo; use OCA\Files_Sharing\Middleware\OCSShareAPIMiddleware; +use OCA\Files_Sharing\Middleware\ShareInfoMiddleware; use OCA\Files_Sharing\MountProvider; use OCP\AppFramework\App; use OC\AppFramework\Utility\SimpleContainer; @@ -124,9 +125,16 @@ class Application extends App { ); }); + $container->registerService(ShareInfoMiddleware::class, function () use ($server) { + return new ShareInfoMiddleware( + $server->getShareManager() + ); + }); + // Execute middlewares $container->registerMiddleWare('SharingCheckMiddleware'); $container->registerMiddleWare('OCSShareAPIMiddleware'); + $container->registerMiddleWare(ShareInfoMiddleware::class); $container->registerService('MountProvider', function (IContainer $c) { /** @var \OCP\IServerContainer $server */ |