mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
parent
2c1687ce91
commit
c75d3e6961
8 changed files with 36 additions and 78 deletions
|
@ -246,7 +246,6 @@ class ConfigController extends AbstractController
|
|||
'username' => $user->getUsername(),
|
||||
'token' => $config->getFeedToken(),
|
||||
],
|
||||
'twofactor_auth' => $this->getParameter('twofactor_auth'),
|
||||
'wallabag_url' => $this->getParameter('domain_name'),
|
||||
'enabled_users' => $userRepository->getSumEnabledUsers(),
|
||||
]);
|
||||
|
@ -259,10 +258,6 @@ class ConfigController extends AbstractController
|
|||
*/
|
||||
public function disableOtpEmailAction()
|
||||
{
|
||||
if (!$this->getParameter('twofactor_auth')) {
|
||||
return $this->createNotFoundException('two_factor not enabled');
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
$user->setEmailTwoFactor(false);
|
||||
|
||||
|
@ -283,10 +278,6 @@ class ConfigController extends AbstractController
|
|||
*/
|
||||
public function otpEmailAction()
|
||||
{
|
||||
if (!$this->getParameter('twofactor_auth')) {
|
||||
return $this->createNotFoundException('two_factor not enabled');
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
|
||||
$user->setGoogleAuthenticatorSecret(null);
|
||||
|
@ -310,10 +301,6 @@ class ConfigController extends AbstractController
|
|||
*/
|
||||
public function disableOtpAppAction()
|
||||
{
|
||||
if (!$this->getParameter('twofactor_auth')) {
|
||||
return $this->createNotFoundException('two_factor not enabled');
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
|
||||
$user->setGoogleAuthenticatorSecret('');
|
||||
|
@ -336,10 +323,6 @@ class ConfigController extends AbstractController
|
|||
*/
|
||||
public function otpAppAction(GoogleAuthenticatorInterface $googleAuthenticator)
|
||||
{
|
||||
if (!$this->getParameter('twofactor_auth')) {
|
||||
return $this->createNotFoundException('two_factor not enabled');
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
$secret = $googleAuthenticator->generateSecret();
|
||||
|
||||
|
@ -377,10 +360,6 @@ class ConfigController extends AbstractController
|
|||
*/
|
||||
public function otpAppCancelAction()
|
||||
{
|
||||
if (!$this->getParameter('twofactor_auth')) {
|
||||
return $this->createNotFoundException('two_factor not enabled');
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
$user->setGoogleAuthenticatorSecret(null);
|
||||
$user->setBackupCodes(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue