From 95344d0625dff314fb204cddbfea65f743b1011b Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 27 Jun 2016 10:50:10 +0200 Subject: [PATCH] Quickfix: do not lazy load auth mechanisms for ext storages Some auth mechanisms like SessionCredentials need to register hooks early, so they cannot be lazy loaded. --- apps/files_external/lib/AppInfo/Application.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index f78411038f..b2eaf225e9 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -52,6 +52,10 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide $backendService->registerBackendProvider($this); $backendService->registerAuthMechanismProvider($this); + // force-load auth mechanisms since some will register hooks + // TODO: obsolete these and use the TokenProvider to get the user's password from the session + $this->getAuthMechanisms(); + // app developers: do NOT depend on this! it will disappear with oC 9.0! \OC::$server->getEventDispatcher()->dispatch( 'OCA\\Files_External::loadAdditionalBackends'