-
The switch user handling was previously placed in EXT:beuser, more precisely in the BackendUserControllers' indexAction. It was therefore necessary to link to the extbase based controller with a mix of prefixed arguments and the non prefixed "switchUser" argument. Latter was internally evaluated with GU:_GP(). This means, switching users was done via GET requests in an extbase action, but only in case a non extbase prefixed argument was set. In #94209 this got worse when the BackendUserGroupController was merged into BackendUserController. Since this controller features a "remember my last action" functionality, switch user could no longer reliably be triggered. The evaluation of the non extbase prefixed "switchUser" argument only took place in the "user listing" (indexAction) and the success of the call therefore depended on the users' last called action, as this action was automatically used. This patch now extracts the switch user functionality from EXT:beuser into a dedicated EXT:backend controller, featuring two ajax routes "/switch/user" and "/switch/user/exit". Both accessible via POST requests only. To trigger those requests, a new JS module "TYPO3/CMS/Backend/SwitchUser" is introduced. This also allows to completely remove the logout hook by using the concrete markup (custom element) for the "exit" button. Resolves: #94426 Related: #94209 Releases: master Change-Id: I556b323fe6ae77cf696e7e34dbbe269eb4f9927a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69635 Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Benni Mack <benni@typo3.org>
70f8559a