‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Middleware\BackendModuleValidator Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Middleware\BackendModuleValidator:

Public Member Functions

 __construct (protected readonly UriBuilder $uriBuilder, protected readonly ModuleProvider $moduleProvider, protected readonly FlashMessageService $flashMessageService,)
 
 process (ServerRequestInterface $request, RequestHandlerInterface $handler)
 

Protected Member Functions

 validateModuleAccess (ServerRequestInterface $request, ModuleInterface $module)
 
 enqueueRedirectMessage (ModuleInterface $requestedModule, ModuleInterface $redirectedModule)
 
 getLanguageService ()
 

Detailed Description

Validates module access and extends the PSR-7 Request with the resolved module object for the use in further components.

Definition at line 48 of file BackendModuleValidator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Middleware\BackendModuleValidator::__construct ( protected readonly UriBuilder  $uriBuilder,
protected readonly ModuleProvider  $moduleProvider,
protected readonly FlashMessageService  $flashMessageService 
)

Definition at line 50 of file BackendModuleValidator.php.

Member Function Documentation

◆ enqueueRedirectMessage()

◆ getLanguageService()

TYPO3\CMS\Backend\Middleware\BackendModuleValidator::getLanguageService ( )
protected

◆ process()

TYPO3\CMS\Backend\Middleware\BackendModuleValidator::process ( ServerRequestInterface  $request,
RequestHandlerInterface  $handler 
)

◆ validateModuleAccess()

TYPO3\CMS\Backend\Middleware\BackendModuleValidator::validateModuleAccess ( ServerRequestInterface  $request,
ModuleInterface  $module 
)
protected

Checks whether the current user is allowed to access the requested module. Does also evaluate page access permissions, in case an "id" is given in the request.

Exceptions
ModuleAccessDeniedException

Definition at line 210 of file BackendModuleValidator.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Backend\Module\ModuleInterface\getIdentifier(), and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.

Referenced by TYPO3\CMS\Backend\Middleware\BackendModuleValidator\process().