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