[TASK] Move BE User initialization into PSR-15 middleware 93/55793/3
authorBenni Mack <benni@typo3.org>
Mon, 19 Feb 2018 09:14:54 +0000 (10:14 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 19 Feb 2018 10:47:57 +0000 (11:47 +0100)
commitf7463c763b175d8fd4e52e8024f1843f76357c17
tree18c9ac6c90fb40cecb28fa85590b17006caffcb8
parent25b9253fc2fe7ad76368ed136bff6f7324648558
[TASK] Move BE User initialization into PSR-15 middleware

The initialization of a Backend user for Frontend Contexts is currently
bound to TSFE, however, the only parts where TSFE is actually
needed is to set the flag "beUserLogin".

Additionally, the initialization of the Language object is now
moved into the middleware, directly after the set up of $GLOBALS['BE_USER']
to allow the admin panel to use $GLOBALS['LANG'] as well.

Further steps are to deprecate "$TSFE->initializeBackendUser()" method,
and to deprecate the hooks, as they can now be implemented as PSR-15
middlewares.

Additional cleanups on the Authentication object will follow separately
once all Middlewares and the Request object are in place.

For now, this patch aims to extract the logic and keep maximum backwards-
compatibility.

Resolves: #83959
Releases: master
Change-Id: Ia4055f2d3671e9c14e492baa4eea724d989e9521
Reviewed-on: https://review.typo3.org/55793
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php [new file with mode: 0644]
typo3/sysext/frontend/Configuration/RequestMiddlewares.php