Properly query the methodreflector
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
0e5147f001
commit
2452a3ec73
|
@ -29,6 +29,7 @@ use OC\AppFramework\Utility\TimeFactory;
|
||||||
use OC\Settings\Mailer\NewUserMailHelper;
|
use OC\Settings\Mailer\NewUserMailHelper;
|
||||||
use OCA\Provisioning_API\Middleware\ProvisioningApiMiddleware;
|
use OCA\Provisioning_API\Middleware\ProvisioningApiMiddleware;
|
||||||
use OCP\AppFramework\App;
|
use OCP\AppFramework\App;
|
||||||
|
use OCP\AppFramework\Utility\IControllerMethodReflector;
|
||||||
use OCP\Defaults;
|
use OCP\Defaults;
|
||||||
use OCP\Util;
|
use OCP\Util;
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ class Application extends App {
|
||||||
$isAdmin = $user !== null ? $server->getGroupManager()->isAdmin($user->getUID()) : false;
|
$isAdmin = $user !== null ? $server->getGroupManager()->isAdmin($user->getUID()) : false;
|
||||||
$isSubAdmin = $user !== null ? $server->getGroupManager()->getSubAdmin()->isSubAdmin($user) : false;
|
$isSubAdmin = $user !== null ? $server->getGroupManager()->getSubAdmin()->isSubAdmin($user) : false;
|
||||||
return new ProvisioningApiMiddleware(
|
return new ProvisioningApiMiddleware(
|
||||||
$c['ControllerMethodReflector'],
|
$c->query(IControllerMethodReflector::class),
|
||||||
$isAdmin,
|
$isAdmin,
|
||||||
$isSubAdmin
|
$isSubAdmin
|
||||||
);
|
);
|
||||||
|
|
|
@ -164,7 +164,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
||||||
return new Dispatcher(
|
return new Dispatcher(
|
||||||
$c['Protocol'],
|
$c['Protocol'],
|
||||||
$c['MiddlewareDispatcher'],
|
$c['MiddlewareDispatcher'],
|
||||||
$c['ControllerMethodReflector'],
|
$c->query(IControllerMethodReflector::class),
|
||||||
$c['Request']
|
$c['Request']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue