Skip to content

Commit

Permalink
API Make AdminRegistrationController a subclass of AdminController (#573
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GuySartorelli authored Nov 19, 2024
1 parent a65bd0c commit 7c87f74
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Controller/AdminRegistrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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',
Expand Down

0 comments on commit 7c87f74

Please sign in to comment.