SilverStripe\SecurityExtensions\Control\SudoModeController
Responsible for checking and verifying whether sudo mode is enabled
Synopsis
class SudoModeController
extends LeftAndMain
{
- // members
- private static string $url_segment = 'sudomode';
- private static boolean $ignore_menuitem = true;
- private static array $allowed_actions = ;
- private static array $dependencies = ;
- private static string $help_link = 'https://userhelp.silverstripe.org/en/4/optional_features/multi-factor_authentication/user_manual/managing_your_mfa_settings/#managing-your-mfa-settings';
- private SudoModeServiceInterface $sudoModeService;
- private static boolean $required_permission_codes = false;
- // methods
- public void getClientConfig()
- public HTTPResponse check()
- public HTTPResponse activate()
- private bool checkPassword()
- private HTTPResponse jsonResponse()
- public $this setSudoModeService()
- public SudoModeServiceInterface getSudoModeService()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Members
private
- $allowed_actions
- $dependencies
- $help_link
- $required_permission_codes
—
boolean
Explicitly disable required permissions for sudo mode checks - $sudoModeService — SilverStripe\SecurityExtensions\Service\SudoModeServiceInterface
- $url_segment
Methods
private
- checkPassword() — Checks the provided password is valid for the current member. Will return false if insufficient data is available to validate the request.
- jsonResponse() — Returns a JSON response with an encoded body and provided HTTP status code
public
- activate() — After validating the request data including password against the current member, activate sudo mode for the current member.
- check() — Checks whether sudo mode is active for the current user
- getClientConfig()
- getSudoModeService()
- setSudoModeService()