diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-10-02 09:57:33 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-10-02 12:03:53 +0200 |
commit | 3d2acb5003a4953d3f422b34f670d87c4afb11c9 (patch) | |
tree | 89ec8d0821639581110f0b73db75a89defbdbb8a /apps/files_sharing/appinfo/application.php | |
parent | dc38e674a5d547e7fd53d66fb0ac0dbb5490ea77 (diff) | |
download | nextcloud-server-3d2acb5003a4953d3f422b34f670d87c4afb11c9.tar.gz nextcloud-server-3d2acb5003a4953d3f422b34f670d87c4afb11c9.zip |
sharingcheckmiddleware now handles externalshares as well
Added new annotations for the externalsharescontroller class
* @NoOutgoingFederatedSharingRequired
* @NoIncomingFederatedSharingRequired
By default both are required for all functions in the
externalSharesController.
A proper exception is thrown and then a 405 is returned instead of the
default error page. Since it is only an API endpoint this makes more
sense.
Unit tests added and updated
Diffstat (limited to 'apps/files_sharing/appinfo/application.php')
-rw-r--r-- | apps/files_sharing/appinfo/application.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/files_sharing/appinfo/application.php b/apps/files_sharing/appinfo/application.php index d0dcadb77e8..ad5d5d63231 100644 --- a/apps/files_sharing/appinfo/application.php +++ b/apps/files_sharing/appinfo/application.php @@ -61,7 +61,6 @@ class Application extends App { return new ExternalSharesController( $c->query('AppName'), $c->query('Request'), - $c->query('IsIncomingShareEnabled'), $c->query('ExternalManager'), $c->query('HttpClientService') ); @@ -82,9 +81,6 @@ class Application extends App { $container->registerService('HttpClientService', function (SimpleContainer $c) use ($server) { return $server->getHTTPClientService(); }); - $container->registerService('IsIncomingShareEnabled', function (SimpleContainer $c) { - return Helper::isIncomingServer2serverShareEnabled(); - }); $container->registerService('ExternalManager', function (SimpleContainer $c) use ($server) { $user = $server->getUserSession()->getUser(); $uid = $user ? $user->getUID() : null; @@ -105,7 +101,8 @@ class Application extends App { return new SharingCheckMiddleware( $c->query('AppName'), $server->getConfig(), - $server->getAppManager() + $server->getAppManager(), + $c['ControllerMethodReflector'] ); }); |