Skip to content

Commit 0563b8b

Browse files
fixup! feat(app-framework): Add support for global middlewares
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent ef329f7 commit 0563b8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/private/AppFramework/DependencyInjection/DIContainer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,9 @@ public function __construct(string $appName, array $urlParams = [], ServerContai
319319
$coordinator = $c->get(\OC\AppFramework\Bootstrap\Coordinator::class);
320320
$registrationContext = $coordinator->getRegistrationContext();
321321
if ($registrationContext !== null) {
322+
$appId = $this->getAppName();
322323
foreach ($registrationContext->getMiddlewareRegistrations() as $middlewareRegistration) {
323-
if ($middlewareRegistration->getAppId() === $this->getAppName()
324+
if ($middlewareRegistration->getAppId() === $appId
324325
|| $middlewareRegistration->isGlobal()) {
325326
$dispatcher->registerMiddleware($c->get($middlewareRegistration->getService()));
326327
}

0 commit comments

Comments
 (0)