Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Make AdminRegistrationController a subclass of AdminController #573

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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