78546[TASK] Reorganize & streamline sudo mode handling
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Andreas Kienast +1
-
Verified V +2 Done
- Benni Mack +2
- Andreas Kienast +1
- core-ci +1 CI
Issues 1
Files 44
- Build/phpstan/phpstan-baseline.neon+0 −10
- Build/Sources/TypeScript/backend/security/element/sudo-mode.ts4new+119 −0
- Build/Sources/TypeScript/core/event/regular-event.ts1+8 −0
- Build/Sources/TypeScript/install/backend-user-confirmation.tsdeleted+0 −31
- typo3/sysext/backend/Classes/Controller/Security/SudoModeController.php3new+216 −0
- typo3/sysext/backend/Classes/Http/RouteDispatcher.php+41 −0
- typo3/sysext/backend/Classes/Middleware/SudoModeInterceptor.phpnew+85 −0
- typo3/sysext/backend/Classes/Module/BaseModule.php+8 −0
- typo3/sysext/backend/Classes/Module/ExtbaseModule.php+19 −13
- typo3/sysext/backend/Classes/Module/Module.php+10 −6
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessClaim.phpnew+47 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessFactory.phpnew+109 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessGrant.phpnew+41 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessLifetime.phpnew+48 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessStorage.phpnew+139 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessSubjectInterface.phpnew+51 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/RouteAccessSubject.php2new+96 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/ServerRequestInstruction.php2new+167 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Exception/RequestGrantedException.phpnew+42 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Exception/VerificationRequiredException.phpnew+42 −0
Show 24 more files
- typo3/sysext/backend/Classes/Security/SudoMode/PasswordVerification.phpnew+124 −0
- typo3/sysext/backend/Classes/ServiceProvider.php+4 −0
- typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php+5 −0
- typo3/sysext/backend/Configuration/Backend/Routes.php+12 −0
- typo3/sysext/backend/Configuration/RequestMiddlewares.php+7 −1
- typo3/sysext/backend/Configuration/Services.yaml+9 −0
- typo3/sysext/backend/Resources/Private/Language/SudoMode.xlfnew+41 −0
- typo3/sysext/backend/Resources/Private/Templates/SudoMode/Error.htmlnew+34 −0
- typo3/sysext/backend/Resources/Private/Templates/SudoMode/Module.htmlnew+14 −0
- typo3/sysext/backend/Resources/Public/JavaScript/security/element/sudo-mode.jsnew+55 −0
- typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php+26 −8
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-96733-NewBackendModuleRegistrationAPI.rst+5 −0
- typo3/sysext/core/Documentation/Changelog/12.4/Important-94246-GenericSudoModeConfiguration.rstnew+105 −0
- typo3/sysext/core/Resources/Public/JavaScript/event/regular-event.js+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Extensionmanager/GetExtensionsCest.php+7 −0
- typo3/sysext/core/Tests/Acceptance/Application/Extensionmanager/InstalledExtensionsCest.php+7 −0
- typo3/sysext/core/Tests/Acceptance/Application.suite.yml+5 −0
- typo3/sysext/extensionmanager/Configuration/Backend/Modules.php+7 −0
- typo3/sysext/install/Classes/Controller/BackendModuleController.php+4 −178
- typo3/sysext/install/Configuration/Backend/Modules.php+25 −0
- typo3/sysext/install/Configuration/Backend/Routes.php+0 −5
- typo3/sysext/install/Resources/Private/Language/BackendModule.xlf+0 −18
- typo3/sysext/install/Resources/Private/Templates/BackendModule/BackendUserConfirmation.htmldeleted+0 −76
- typo3/sysext/install/Resources/Public/JavaScript/backend-user-confirmation.jsdeleted+0 −13
Review log 3757
Show 1832 earlier messages
-
Oliver Hader uploaded patch set 1 04/08/23, 14:12
-
Oliver Hader uploaded patch set 2 04/08/23, 14:28
-
core-ci voted on patch set 1 V -1 04/08/23, 14:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40376
-
core-ci voted on patch set 2 V -1 04/08/23, 15:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40377
-
Oliver Hader uploaded patch set 3
V -104/08/23, 19:26 -
Oliver Hader uploaded patch set 4 04/08/23, 19:51
-
core-ci voted on patch set 3 V -1 04/08/23, 19:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40380
-
core-ci voted on patch set 4 V +1 04/08/23, 19:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40381
-
Oliver Hader commented on patch set 4 04/09/23, 08:06
-
Oliver Hader commented on patch set 5
V +104/09/23, 08:07Published edit on patch set 4. -
Oliver Hader commented on patch set 6 04/09/23, 08:07
Published edit on patch set 5. -
core-ci voted on patch set 6 V +1 04/09/23, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40392
-
Oliver Hader uploaded patch set 7
V +104/09/23, 08:40 -
Oliver Hader commented on patch set 7 04/09/23, 08:41
ConfirmationController.php:137ReplyDone -
core-ci voted on patch set 7 V +1 04/09/23, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40395
-
Oliver Hader uploaded patch set 8
V +104/10/23, 12:17 -
Oliver Hader rebased onto patch set 9 04/10/23, 12:17
-
core-ci voted on patch set 8 V -1 04/10/23, 13:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40407
-
core-ci voted on patch set 9 V -1 04/10/23, 13:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40408
-
Oliver Hader uploaded patch set 10
V -104/10/23, 16:33 -
core-ci voted on patch set 10 V -1 04/10/23, 16:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40416
-
Oliver Hader uploaded patch set 11
V -104/11/23, 09:36 -
Oliver Hader uploaded patch set 12 04/11/23, 09:45
-
core-ci voted on patch set 11 V -1 04/11/23, 09:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40448
-
core-ci voted on patch set 12 V -1 04/11/23, 10:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40449
-
Oliver Hader uploaded patch set 13
V -104/12/23, 21:29 -
core-ci voted on patch set 13 V -1 04/12/23, 21:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40533
-
Oliver Hader uploaded patch set 14
V -104/12/23, 21:41 -
core-ci voted on patch set 14 V -1 04/12/23, 22:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40535
-
Oliver Hader uploaded patch set 15
V -104/13/23, 08:16 -
core-ci voted on patch set 15 V -1 04/13/23, 08:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40553
-
Oliver Hader uploaded patch set 16
V -104/14/23, 09:51
-
Oliver Hader marked it ready for review 04/14/23, 09:52
-
core-ci voted on patch set 16 V +1 04/14/23, 10:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40601
-
Oliver Hader commented on patch set 16 04/14/23, 10:10
regular-event.ts:29Required, otherwise there were unrelated CodeCeption failures: ``` Acceptance/Application/Extensionmanager/GetExtensionsCest.php:checkRetrievedExtensionsFromTerAreDisplayed Found following JavaScript errors in the browser console: 09:10:16.223 SEVERE - /typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.js?bust=fdba00ea3a15406c2b927fab1c8ee5bb74575a2a 4060:12 "TypeError: Cannot read properties of null (reading 'addEventListener')\n at RegularEvent.delegateTo (http://web:8000/typo3temp/var/tests/acceptance/typo3/sysext/core/Resources/Public/JavaScript/event/regular-event.js?bust=fdba00ea3a15406c2b927fab1c8ee5bb74575a2a:13:220)\n at HTMLDocument.ShortcutMenu.initializeEvents (http://web:8000/typo3temp/var/tests/acceptance/typo3/sysext/backend/Resources/Public/JavaScript/toolbar/shortcut-menu.js?bust=fdba00ea3a15406c2b927fab1c8ee5bb74575a2a:13:1333)\n at mightThrow (http://web:8000/typo3temp/var/tests/acceptance/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.js?bust=fdba00ea3a15406c2b927fab1c8ee5bb74575a2a:3768:29)\n at process (http://web:8000/typo3temp/var/tests/acceptance/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.js?bust=fdba00ea3a15406c2b927fab1c8ee5bb74575a2a:3836:12)" 09:10:16.224 SEVERE - /typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.js?bust=fdba00ea3a15406c2b927fab1c8ee5bb74575a2a 4061:2 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener') ``` Not adding events to `null` elements is basically a good thing. However I was not able to track down the root issue in `shortcut-menu.ts` (and why `jQuery` is the initiator here). -
Christian Kuhn commented on patch set 16 04/14/23, 10:34
minor remarks skimming through the code.SudoModeController.php:44finalSudoModeController.php:56it should be no issue to set all of this (and the properties) private. -
Oliver Hader commented on patch set 16 04/14/23, 12:41
SudoModeController.php:44ReplyFine for meSudoModeController.php:56ReplyYepp, when the class in `final`, using `private` is kind of obvious. -
Oliver Hader uploaded patch set 17
V +104/14/23, 12:41 -
core-ci voted on patch set 17 V +1 04/14/23, 12:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40620
-
Benni Mack uploaded patch set 18
V +104/14/23, 16:46 -
core-ci voted on patch set 18 V -1 04/14/23, 17:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40633
-
Oliver Hader commented on patch set 18 04/15/23, 06:29
SudoModeController.php:18I put the controller to `Backend\Security\SudoMode` on purpose, since that's like the domain of the sudo sudo, a sub-package in the backend component. Putting things to the `Controller` namespace clutters these classes more. However, I'd be fine with that, since the templates for `Controller\Security` are located in `Resources/Private/Templates/Security`.RouteAccessSubject.php:57`final public function __constructor` was used due to the `static` aspect of the static interface method `fromArray(array $data): static`. See https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static -
Oliver Hader uploaded patch set 19
V -104/15/23, 06:50 -
core-ci voted on patch set 19 V +1 04/15/23, 06:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40669
-
Christian Kuhn commented on patch set 19 04/15/23, 09:36
SudoModeController.php:18Replyyeah. keeping all controllers in Controller/ sub directory is better and sticks to casual expectations. thx. -
Oliver Hader commented on patch set 19 04/15/23, 09:39
SudoModeController.php:18ReplyAck -
Oliver Hader uploaded patch set 20
V +104/19/23, 17:07 -
Oliver Hader commented on patch set 20 04/19/23, 17:07
RouteAccessSubject.php:57ReplyDone -
core-ci voted on patch set 20 V +1 04/19/23, 17:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40925
-
Georg Ringer voted on patch set 20 V +1 CR +1 04/23/23, 06:31
-
Andreas Kienast commented on patch set 20 CR -1 04/24/23, 06:07
sudo-mode.ts:20interface is unusedsudo-mode.ts:35wrong class nameServerRequestInstruction.php:88Should we make __clone protected as well? -
Andreas Kienast uploaded patch set 21
CR +1V +104/24/23, 06:25 -
Andreas Kienast commented on patch set 21 04/24/23, 06:25
sudo-mode.ts:20ReplyDonesudo-mode.ts:35ReplyDoneServerRequestInstruction.php:88ReplyDone -
core-ci voted on patch set 21 V +1 04/24/23, 06:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41114
-
Andreas Kienast voted on patch set 21 V +1 CR +1 04/24/23, 06:36
-
Benni Mack voted on patch set 21 V +2 CR +2 04/24/23, 06:56
-
Benni Mack merged patch set 22 04/24/23, 06:56
ConfirmationController.php:137