Skip to content
Snippets Groups Projects
Commit 8568d785 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Georg Ringer
Browse files

[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: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 863fe203
Branches
Tags
No related merge requests found
Showing
with 348 additions and 164 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment