diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-01-23 17:11:39 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-01-26 11:54:28 +0100 |
commit | 8d9af3e26214f07e833a6b8d8b60329fc71916a7 (patch) | |
tree | c41dc1835261e45f9f5751b0d07d1f45d8f4d7ba /lib/public | |
parent | 3eb73d0a3d081194e676b7e7ba220a118e01e18d (diff) | |
download | nextcloud-server-8d9af3e26214f07e833a6b8d8b60329fc71916a7.tar.gz nextcloud-server-8d9af3e26214f07e833a6b8d8b60329fc71916a7.zip |
feat(app-framework): Add support for global middlewares
This allows apps to register middlewares that always register, not just
for the app's own requests
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/AppFramework/Bootstrap/IRegistrationContext.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index 7ff2bdca52e..3748714bb79 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -138,14 +138,16 @@ interface IRegistrationContext { /** * @param string $class + * @param bool $global load this middleware also for requests of other apps? Added in Nextcloud 26 * @psalm-param class-string<\OCP\AppFramework\Middleware> $class * * @return void * @see IAppContainer::registerMiddleWare() * * @since 20.0.0 + * @since 26.0.0 Added optional argument $global */ - public function registerMiddleware(string $class): void; + public function registerMiddleware(string $class, bool $global = false): void; /** * Register a search provider for the unified search |