Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-09-10 18:02:37 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-09-25 10:54:20 +0300
commit7586b19e524761c1e8aab5170375a0d6c9e8f7a2 (patch)
treee2a0fc5fa9754c12cfd226bf7aa48964fce18237 /core/register_command.php
parent92fa373314e77dc905036812253f6b776a9e1aaf (diff)
Only allow 2FA state changs if providers support the operation
Ref https://github.com/nextcloud/server/issues/11019. Add `twofactorauth:cleanup` command Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/register_command.php')
-rw-r--r--core/register_command.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/register_command.php b/core/register_command.php
index 744ee23e16b..ed0220e7055 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -66,12 +66,9 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
$application->add(new OC\Core\Command\App\GetPath());
$application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
- $application->add(new OC\Core\Command\TwoFactorAuth\Enable(
- \OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager()
- ));
- $application->add(new OC\Core\Command\TwoFactorAuth\Disable(
- \OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager()
- ));
+ $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
+ $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
+ $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
$application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));