Properly query the methodreflector

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-11-02 11:54:11 +01:00
parent 0e5147f001
commit 2452a3ec73
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ use OC\AppFramework\Utility\TimeFactory;
use OC\Settings\Mailer\NewUserMailHelper;
use OCA\Provisioning_API\Middleware\ProvisioningApiMiddleware;
use OCP\AppFramework\App;
use OCP\AppFramework\Utility\IControllerMethodReflector;
use OCP\Defaults;
use OCP\Util;
@ -57,7 +58,7 @@ class Application extends App {
$isAdmin = $user !== null ? $server->getGroupManager()->isAdmin($user->getUID()) : false;
$isSubAdmin = $user !== null ? $server->getGroupManager()->getSubAdmin()->isSubAdmin($user) : false;
return new ProvisioningApiMiddleware(
$c['ControllerMethodReflector'],
$c->query(IControllerMethodReflector::class),
$isAdmin,
$isSubAdmin
);

View File

@ -164,7 +164,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return new Dispatcher(
$c['Protocol'],
$c['MiddlewareDispatcher'],
$c['ControllerMethodReflector'],
$c->query(IControllerMethodReflector::class),
$c['Request']
);
});