69333[TASK] Streamline some ext:beuser code smells
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 11
- typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php+5 −1
- typo3/sysext/beuser/Classes/Controller/BackendUserController.php7+44 −46
- typo3/sysext/beuser/Classes/Domain/Model/BackendUser.php9+157 −61
- typo3/sysext/beuser/Classes/ViewHelpers/SpriteIconForRecordViewHelper.php+4 −4
- typo3/sysext/beuser/Classes/ViewHelpers/SwitchUserViewHelper.phpdeleted+0 −77
- typo3/sysext/beuser/Configuration/Extbase/Persistence/Classes.php5+21 −0
- typo3/sysext/beuser/Resources/Private/Partials/BackendUser/IndexListRow.html3+16 −3
- typo3/sysext/beuser/Resources/Private/Partials/BackendUser/PaginatedList.html+9 −1
- typo3/sysext/beuser/Resources/Private/Partials/BackendUserGroup/PaginatedList.html+7 −1
- typo3/sysext/beuser/Tests/Unit/Domain/Model/BackendUserTest.php+5 −5
- typo3/sysext/beuser/ext_tables.php+1 −1
Review log 1725
-
Christian Kuhn uploaded patch set 1 05/31/21, 11:09
-
core-ci voted on patch set 1 V +1 05/31/21, 11:21 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12027
-
Christian Kuhn uploaded patch set 2 05/31/21, 13:54
-
core-ci voted on patch set 2 V +1 05/31/21, 14:03 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12040
-
Christian Kuhn uploaded patch set 3 05/31/21, 14:07
-
core-ci voted on patch set 3 V +1 05/31/21, 14:17 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12041
-
Christian Kuhn uploaded patch set 4 06/01/21, 05:50
-
Christian Kuhn commented on patch set 4 06/01/21, 05:56
resolved conflict -
core-ci voted on patch set 4 V +1 06/01/21, 05:59 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12056
-
Oli Bartsch commented on patch set 4 06/01/21, 06:46
BackendUserController.php:547Is this check really required? Actually the models' `isAllowedToSwitchTo` function checks, if the target user is not the current user, is active (disable=0) and if not already in switch user session.BackendUser.php:70Missing empty line here and also for the other setters below.BackendUser.php:82:void should be added to those setters.BackendUser.php:90This sounds odd. Should be "isAdministrator".Classes.php:12Isn't "is.." more a name for the getter then? So the fields should IMO just be named "administrator" and "disabled".Classes.php:21No really strong preference, but I would name it "startDateTime". Don't get the additional "and".IndexListRow.html:115Since this will return a bool, I would prefer !{backendUser.allowedToSwitchTo} here. However, not really that important. -
Jochen Roth commented on patch set 4 06/01/21, 09:36
BackendUserController.php:561Multiple spacesBackendUser.php:102If above comment applies this should also be changed to "isDisabled" -
Anja Leichsenring commented on patch set 4 06/01/21, 17:17
BackendUserController.php:550using a use statement for a top level Exception is not prefered -
Christian Kuhn commented on patch set 4 06/01/21, 18:14
BackendUserController.php:547ReplyI'd opt to keep it this way at the moment: I'll change the BackendUser model with a next patch anyways and could then fetch the user with a repository->findBy here and use it ... maybe keep for now and adapt then?BackendUserController.php:550ReplyDoneBackendUserController.php:561ReplyDoneBackendUser.php:70Reply Unresolvedi think it's better readable if these getters/setters are paired. the setters will vanish with my next patch anyways ;)BackendUser.php:82ReplyDoneBackendUser.php:90ReplyDoneBackendUser.php:102ReplyDoneClasses.php:12ReplyDoneClasses.php:21Replylet's not do that now ... this file will vanish soon, and it's currently a copy of those things I needed from the extbase base model.IndexListRow.html:115Reply UnresolvedI wanted the "empty" icon in "then" to be in line with the other things above. -
Christian Kuhn uploaded patch set 5 06/01/21, 18:15
-
core-ci voted on patch set 5 V -1 06/01/21, 18:17 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12096
-
Christian Kuhn uploaded patch set 6 06/01/21, 18:38
-
core-ci voted on patch set 6 V +1 06/01/21, 18:50 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12101
-
Oli Bartsch uploaded patch set 7 06/01/21, 20:36
-
Oli Bartsch commented on patch set 7 V +1 CR +1 06/01/21, 20:41
BackendUserController.php:547ReplyDoneClasses.php:21ReplyDone -
core-ci voted on patch set 7 V +1 06/01/21, 20:45 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12109
-
Benjamin Franzke uploaded patch set 8 06/02/21, 02:54
-
Benjamin Franzke commented on patch set 8 06/02/21, 02:54
BackendUser.php:240UnresolvedI think the usage of `$GLOBALS['BE_USER']` reveals that this method is not "really" properly suited for being added to this data model. Yes, isPasswordResetEnabled() does the same, but I'd rather see the usages of $GLOBALS['BE_USER'] to be reduced. Any chance to split this into two commits? a) switch user handling b) model adaptions (and then including the follow ups you already mention in the commit message)IndexListRow.html:120UnresolvedAs already discussed in slack, let's additionally use a POST request instead of GET. Separate action is good though (and although a separate route would be nicer, I guess actions are fine in this extbase context). -
core-ci voted on patch set 8 V +1 06/02/21, 03:05 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12116
-
Christian Kuhn abandoned the change 06/02/21, 12:37
-
Christian Kuhn commented on patch set 8 06/02/21, 12:45
this is maybe split into smaller patches.