diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-01-02 11:57:05 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-01-11 19:20:11 +0100 |
commit | 21d3fe588396ebb3535a947ee4afd514aa24bd78 (patch) | |
tree | 7e1d61534c7e58ef00f607980e0b707afd284ad4 /lib/private/Server.php | |
parent | 6f74ecd94a65485f9cd09434845f3c62e66fb9e5 (diff) | |
download | nextcloud-server-21d3fe588396ebb3535a947ee4afd514aa24bd78.tar.gz nextcloud-server-21d3fe588396ebb3535a947ee4afd514aa24bd78.zip |
do not hard-require the token provider
The provider might need DB access and therefore depenedency
resolution fails on the setup page where we cannot inject
the db implementation.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 45ed9d5e3bc..903e05925ee 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -250,9 +250,13 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerService(Store::class, function(Server $c) { $session = $c->getSession(); - $tokenProvider = $c->query('OC\Authentication\Token\DefaultTokenProvider'); + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { + $tokenProvider = $c->query('OC\Authentication\Token\IProvider'); + } else { + $tokenProvider = null; + } $logger = $c->getLogger(); - return new Store($session, $tokenProvider, $logger); + return new Store($session, $logger, $tokenProvider); }); $this->registerAlias(IStore::class, Store::class); $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) { |