Skip to content

Commit f46251e

Browse files
committed
#276 2fa redirect checks wrong permissions
1 parent 82f5617 commit f46251e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

TwoFactorAuth/Observer/ControllerActionPredispatch.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Magento\TwoFactorAuth\Api\TfaInterface;
2121
use Magento\TwoFactorAuth\Api\TfaSessionInterface;
2222
use Magento\TwoFactorAuth\Api\UserConfigRequestManagerInterface;
23+
use Magento\TwoFactorAuth\Controller\Adminhtml\Tfa\Requestconfig;
2324
use Magento\TwoFactorAuth\Model\UserConfig\HtmlAreaTokenVerifier;
2425

2526
/**
@@ -145,7 +146,7 @@ public function execute(Observer $observer)
145146

146147
if (!$accessGranted && $configurationStillRequired) {
147148
//User needs special link with a token to be allowed to configure 2FA
148-
if ($this->authorization->isAllowed(Configure::ADMIN_RESOURCE)) {
149+
if ($this->authorization->isAllowed(Requestconfig::ADMIN_RESOURCE)) {
149150
$this->redirect('tfa/tfa/requestconfig');
150151
} else {
151152
$this->redirect('tfa/tfa/accessdenied');

0 commit comments

Comments
 (0)