From 7c87f748c25fa97cf7e756189accab15d88d5d93 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:44:40 +1300 Subject: [PATCH] API Make AdminRegistrationController a subclass of AdminController (#573) --- src/Controller/AdminRegistrationController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Controller/AdminRegistrationController.php b/src/Controller/AdminRegistrationController.php index 942309b..8318a5b 100644 --- a/src/Controller/AdminRegistrationController.php +++ b/src/Controller/AdminRegistrationController.php @@ -5,7 +5,7 @@ namespace SilverStripe\MFA\Controller; use Psr\Log\LoggerInterface; -use SilverStripe\Admin\LeftAndMain; +use SilverStripe\Admin\AdminController; use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPResponse; use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware; @@ -25,15 +25,13 @@ * This controller handles actions that a user may perform on MFA methods registered on their own account while logged * in. This includes deleting methods, registering new methods and replacing (re-registering) existing methods. */ -class AdminRegistrationController extends LeftAndMain +class AdminRegistrationController extends AdminController { use RegistrationHandlerTrait; use BaseHandlerTrait; private static $url_segment = 'mfa'; - private static $ignore_menuitem = true; - private static $url_handlers = [ 'GET register/$Method' => 'startRegistration', 'POST register/$Method' => 'finishRegistration',