Skip to content

Commit 39a80b4

Browse files
author
Rafael Grigorian
committed
Fixed GH-7
1 parent 2cbb872 commit 39a80b4

File tree

1 file changed

+5
-2
lines changed
  • src/app/code/community/JetRails/TwoFactor/Model/Adminhtml

1 file changed

+5
-2
lines changed

src/app/code/community/JetRails/TwoFactor/Model/Adminhtml/Observer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ public function preAdminHtml ( Varien_Event_Observer $observer ) {
5353
$controller = $request->getControllerName ();
5454
$action = $request->getActionName ();
5555
$route = "$frontname/$controller/$action";
56+
// Get current admin front name
57+
$adminFrontName = Mage::getConfig ()
58+
->getNode ("admin/routers/adminhtml/args/frontName");
5659
// Allow the admin logout action
57-
if ( $route === "admin/index/logout" ) return;
60+
if ( $route === "$adminFrontName/index/logout" ) return;
5861
// If two-factor is not forced on role, then ignore everything
5962
if ( !Mage::helper ("twofactor")->isAllowed () ) {
6063
// Check to see if setup or login controllers are being used
@@ -110,4 +113,4 @@ public function preAdminHtml ( Varien_Event_Observer $observer ) {
110113
}
111114
}
112115

113-
}
116+
}

0 commit comments

Comments
 (0)