[TASK] Add BackendModuleValidator PSR-15 middleware
Since introduction of the new module registration API (#96733), the TYPO3 backend route object might contain a Module object as "module" option. This option was then previously used in the RouteDispatcher to check, whether the current user has necessary access permissions for this module. However, the RouteDispatcher should not handle such validation tasks, but only dispatch to the defined target. Therefore, validation of the module access permissions, as well as further checks (e.g. for a given page id) are now moved into a dedicated PSR-15 middleware. To further improve the new API, the middleware also adds the module as attribute to the request. Additionally, the now obsolete "moduleName" route option is removed. It is always the same as the module identifier and can therefore be fetched via the object. Resolves: #96797 Related: #96733 Releases: main Change-Id: I2c580948399136a6ea9199f0872ae874ea99b8fe Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73367 Tested-by:core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com>
Showing
- typo3/sysext/backend/Classes/Backend/Shortcut/ShortcutRepository.php 1 addition, 2 deletions...t/backend/Classes/Backend/Shortcut/ShortcutRepository.php
- typo3/sysext/backend/Classes/Http/RouteDispatcher.php 3 additions, 72 deletionstypo3/sysext/backend/Classes/Http/RouteDispatcher.php
- typo3/sysext/backend/Classes/Middleware/BackendModuleValidator.php 115 additions, 0 deletions...ext/backend/Classes/Middleware/BackendModuleValidator.php
- typo3/sysext/backend/Classes/Module/ExtbaseModule.php 0 additions, 1 deletiontypo3/sysext/backend/Classes/Module/ExtbaseModule.php
- typo3/sysext/backend/Classes/Module/Module.php 0 additions, 1 deletiontypo3/sysext/backend/Classes/Module/Module.php
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php 6 additions, 8 deletionstypo3/sysext/backend/Classes/Template/ModuleTemplate.php
- typo3/sysext/backend/Configuration/RequestMiddlewares.php 7 additions, 1 deletiontypo3/sysext/backend/Configuration/RequestMiddlewares.php
- typo3/sysext/backend/Tests/Functional/Middleware/BackendModuleValidatorTest.php 161 additions, 0 deletions...ests/Functional/Middleware/BackendModuleValidatorTest.php
- typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php 8 additions, 26 deletionstypo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php
- typo3/sysext/belog/Classes/Module/BackendLogModuleBootstrap.php 3 additions, 9 deletions...sysext/belog/Classes/Module/BackendLogModuleBootstrap.php
- typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php 3 additions, 3 deletions...ore/Classes/Authentication/AbstractUserAuthentication.php
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96733-RemovedSupportForModuleHandlingBasedOnTBE_MODULES.rst 13 additions, 2 deletions...733-RemovedSupportForModuleHandlingBasedOnTBE_MODULES.rst
- typo3/sysext/extbase/Classes/Core/Bootstrap.php 4 additions, 6 deletionstypo3/sysext/extbase/Classes/Core/Bootstrap.php
- typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php 1 addition, 1 deletiontypo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php
- typo3/sysext/extbase/Tests/Functional/Mvc/Web/RequestBuilderTest.php 18 additions, 19 deletions...t/extbase/Tests/Functional/Mvc/Web/RequestBuilderTest.php
- typo3/sysext/install/Classes/Updates/ShortcutRecordsMigration.php 1 addition, 9 deletions...sext/install/Classes/Updates/ShortcutRecordsMigration.php
- typo3/sysext/sys_note/Classes/Hook/ButtonBarHook.php 4 additions, 4 deletionstypo3/sysext/sys_note/Classes/Hook/ButtonBarHook.php
Please register or sign in to comment