[BUGFIX] Properly handle module access for workspaces
This fixes a couple of workspace related issues in the module access evaluation. Basically, it's now ensured that the user will never be confronted with an exception for cases where he is in a module, which is not allowed in a workspace and then switches the workspace. This also applies for deep links. Therefore, the the start module evaluation, taking the redirect into account, is now respecting the fact that the given module might be temporarily not accessible. Finally the inheritance of the workspace access restriction is restored by changing the default value in the BaseModule and respecting the parent module's configuration for sub modules in the access check. Previously it was possible to access such sub modules, e.g. the site configuration module in a workspace by using a deep link. Resolves: #102665 Releases: main, 12.4 Change-Id: I1daabcd9d6b1cb9782a96c7c02ae0bf285369ede Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82124 Tested-by:core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/backend/Classes/Controller/BackendController.php 16 additions, 6 deletions...3/sysext/backend/Classes/Controller/BackendController.php
- typo3/sysext/backend/Classes/Exception/ModuleAccessDeniedException.php 25 additions, 0 deletions...backend/Classes/Exception/ModuleAccessDeniedException.php
- typo3/sysext/backend/Classes/Exception/NoAccessibleModuleException.php 25 additions, 0 deletions...backend/Classes/Exception/NoAccessibleModuleException.php
- typo3/sysext/backend/Classes/Middleware/BackendModuleValidator.php 36 additions, 8 deletions...ext/backend/Classes/Middleware/BackendModuleValidator.php
- typo3/sysext/backend/Classes/Module/BaseModule.php 1 addition, 1 deletiontypo3/sysext/backend/Classes/Module/BaseModule.php
- typo3/sysext/backend/Classes/Module/ModuleProvider.php 5 additions, 0 deletionstypo3/sysext/backend/Classes/Module/ModuleProvider.php
- typo3/sysext/backend/Tests/Functional/Middleware/BackendModuleValidatorTest.php 12 additions, 8 deletions...ests/Functional/Middleware/BackendModuleValidatorTest.php
- typo3/sysext/backend/Tests/Functional/Module/ModuleProviderTest.php 98 additions, 0 deletions...xt/backend/Tests/Functional/Module/ModuleProviderTest.php
Please register or sign in to comment