77020[FEATURE] Add command to create a backend user
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Benni Mack +1
-
Verified V +2 Done
- Christian Kuhn +2
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 9
- typo3/sysext/backend/Classes/Command/CreateBackendUserCommand.php27new+357 −0
- typo3/sysext/backend/Configuration/Services.yaml+4 −0
- typo3/sysext/core/Classes/Crypto/PasswordHashing/BcryptPasswordHash.php+1 −1
- typo3/sysext/core/Documentation/Changelog/12.2/Feature-99341-AddCliCreateBeUserCommand.rst8new+51 −0
- typo3/sysext/install/Classes/Command/SetupCommand.php+2 −8
- typo3/sysext/install/Classes/Controller/InstallerController.php+2 −2
- typo3/sysext/install/Classes/Service/SetupDatabaseService.php+2 −1
- typo3/sysext/install/Classes/Service/SetupService.php+16 −23
- typo3/sysext/install/Classes/ServiceProvider.php+1 −0
Review log 5373
Show 3548 earlier messages
-
Jochen Roth uploaded patch set 1 12/12/22, 07:17
-
Jochen Roth uploaded patch set 2 12/12/22, 07:23
-
core-ci voted on patch set 1 V +1 12/12/22, 07:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34897
-
Jochen Roth uploaded patch set 3
V +112/12/22, 07:28 -
core-ci voted on patch set 2 V +1 12/12/22, 07:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34898
-
core-ci voted on patch set 3 V +1 12/12/22, 07:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34899
-
Guido Schmechel commented on patch set 3 12/12/22, 09:40
-
Jochen Roth uploaded patch set 4
V +112/12/22, 23:37 -
Jochen Roth commented on patch set 4 12/12/22, 23:39
CreateBackendUserCommand.php:178ReplyThanks for the hint, this will be fixed with: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77072 -
core-ci voted on patch set 4 V +1 12/12/22, 23:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34964
-
Benni Mack commented on patch set 4 12/13/22, 07:30
You should check with Stefan Buerk on this change. -
Jochen Roth commented on patch set 4 12/13/22, 07:33
Reply
Yep, already talked to him. He'll have a look soonish -
Jochen Roth marked it work in progress 12/13/22, 09:05
-
Jochen Roth uploaded patch set 5
V +112/13/22, 09:49 -
Jochen Roth rebased onto patch set 6 12/13/22, 10:04
-
Jochen Roth marked it ready for review 12/13/22, 10:15
-
core-ci voted on patch set 5 V -1 12/13/22, 10:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35010
-
core-ci voted on patch set 6 V -1 12/13/22, 10:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35014
-
Jochen Roth uploaded patch set 7
V -112/13/22, 11:10 -
core-ci voted on patch set 7 V +1 12/13/22, 11:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35026
-
Guido Schmechel commented on patch set 7 CR -1 12/15/22, 22:26
Short feedback: Everything is feasible for the time being. A user has been created and can log in. What needs to be clarified for me: - Could you formulate the texts/questions a little more? Then it might sound a bit friendlier ;-) - In the RST I would choose a different sample email - In the command there are functions that I would rather expect in the SetupService: UserName Validation, Password Validation. In the SetupService, createUser() is declared public and theoretically I could create users there without password rules. Therefore, for the time being, a light -1 from me until clarification. -
Chris Müller commented on patch set 7 CR -1 12/16/22, 06:38
Feature-99341-AddCliCreateBeUserCommand.rst:14This is an incomplete duplicate of the next paragraph, so should be removed.Feature-99341-AddCliCreateBeUserCommand.rst:17be -> backend -
Oliver Klee commented on patch set 7 12/16/22, 10:03
Feature-99341-AddCliCreateBeUserCommand.rst:49For example emails and domains, please always use example.com. That domain exists for exact that purpose so that the hosters of other domains don't get random automated emails or HTTP requests. :-) -
Frank Nägler commented on patch set 7 V -1 CR -1 12/16/22, 12:33
Nice idea, I love the idea of this command. Anyway, it is not working yet ;)CreateBackendUserCommand.php:88I guess not ;)CreateBackendUserCommand.php:180Uncaught TYPO3 Exception Call to undefined method TYPO3\CMS\Install\Service\SetupDatabaseService::getBackendUserPasswordValidationErrors() -
Jochen Roth commented on patch set 7 12/17/22, 00:38
@Frank, sorry i should have mentionend it depends on this patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/77072/ So, please look at 77072 first, as soon as that is in, i'll go through the comments and fix what needs fixing. -
Jochen Roth uploaded patch set 8
CR -1V +112/17/22, 04:56 -
core-ci voted on patch set 8 V +1 12/17/22, 05:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35211
-
Jochen Roth commented on patch set 8 12/17/22, 05:10
CreateBackendUserCommand.php:88ReplyDoneCreateBackendUserCommand.php:180ReplyApply this patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/77072/ and it will work.Feature-99341-AddCliCreateBeUserCommand.rst:14ReplyAckFeature-99341-AddCliCreateBeUserCommand.rst:17ReplyAckFeature-99341-AddCliCreateBeUserCommand.rst:49ReplyAck -
Jochen Roth uploaded patch set 9
V +112/21/22, 01:46 -
core-ci voted on patch set 9 V +1 12/21/22, 01:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35253
-
Susi Moog commented on patch set 9 12/27/22, 08:54
Nice one. I have some small remarks regarding the wording, otherwise this looks quite good already.CreateBackendUserCommand.php:70"a the" --> theCreateBackendUserCommand.php:83Maybe: "Create user with admin privileges" (same for maintainer, just a bit friendlier, but no must have)CreateBackendUserCommand.php:126I would remove the "BeUser" from all method names.CreateBackendUserCommand.php:138consistency: If we camel case userName here, we should add a space in the explanation text above (where we use "username" currently).CreateBackendUserCommand.php:177the previous method has been private this one is protected again, let's be consistent ;)CreateBackendUserCommand.php:194consistency: - remove "to be set" - the other messages do not include that. - write "the backend user" instead of "your" (see below)CreateBackendUserCommand.php:234why no dependency injection?CreateBackendUserCommand.php:277messages here should be in line with explanation for the arguments above. -
Jochen Roth uploaded patch set 10
V +101/02/23, 01:16 -
Jochen Roth commented on patch set 10 01/02/23, 01:17
Thanks.CreateBackendUserCommand.php:70ReplyDoneCreateBackendUserCommand.php:83ReplyDoneCreateBackendUserCommand.php:126ReplyDone - had to use `getUsername` because `getName` is already in use.CreateBackendUserCommand.php:138ReplyDoneCreateBackendUserCommand.php:177ReplyDoneCreateBackendUserCommand.php:194ReplyDoneCreateBackendUserCommand.php:234ReplyDoneCreateBackendUserCommand.php:277ReplyDone -
core-ci voted on patch set 10 V +1 01/02/23, 01:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35419
-
Susi Moog voted on patch set 10 CR +1 01/05/23, 10:56
-
Susi Moog voted on patch set 10 V +1 01/05/23, 14:44
-
Jörg Bösche voted on patch set 10 CR +1 01/11/23, 09:27
-
Christian Kuhn commented on patch set 10 CR -1 01/11/23, 11:31
-1 for now. I think we should really sort out the ext:install dependency if this command is located in ext:backend.CreateBackendUserCommand.php:31I don't like these two dependencies from ext:backend to ext:install here: We're pretty close to make ext:install optional, it would be good to not introduce new ones. Which options do we have to circumvent this? As far as I can see, two methods are used, which don't have no additional ext:install dependencies. Any chance to circumvent this? -
Susi Moog commented on patch set 10 01/13/23, 07:07
CreateBackendUserCommand.php:31ReplyFrom a quick look it might make sense to move both methods to EXT:backend in general and have the dependency the other way around - as "createBackendUser" is (or should not be) not specific to the install process but may belong to the backend extension logically. -
Christian Kuhn commented on patch set 10 01/13/23, 13:37
CreateBackendUserCommand.php:31Replysince the two methods are rather tiny and have no further dependencies, it would be ok to just copy them to the command, i suppose. -
Jochen Roth uploaded patch set 11
CR +1V +101/30/23, 16:27 -
Jochen Roth commented on patch set 11 01/30/23, 16:37
CreateBackendUserCommand.php:31ReplyI moved the methods with this patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77641 Thought this might come in handy when adding more commands for e.g. user listing -
core-ci voted on patch set 11 V +1 01/30/23, 16:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36781
-
Josef Glatz updated the commit message in patch set 12
V +101/30/23, 18:56 -
core-ci voted on patch set 12 V +1 01/30/23, 19:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36789
-
Jochen Roth uploaded patch set 13
V +101/31/23, 12:17 -
Jochen Roth uploaded patch set 14 01/31/23, 12:23
-
core-ci voted on patch set 14 V -1 01/31/23, 12:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36818
-
Jochen Roth uploaded patch set 15
V -101/31/23, 12:48 -
Jochen Roth uploaded patch set 16 01/31/23, 12:52
-
core-ci voted on patch set 16 V +1 01/31/23, 13:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36820
-
Jochen Roth commented on patch set 16 01/31/23, 13:15
CreateBackendUserCommand.php:31ReplyAgreed with lolli on "just copy" the methods. Also simplified createUser in the installer to minimize code because this is only used by installer and all flags are needed anyways. -
Oliver Klee wrote 01/31/23, 15:01
Removed cc Oliver Klee. -
Christian Kuhn commented on patch set 16 CR -1 02/01/23, 16:08
will push. -
Christian Kuhn uploaded patch set 17
CR -1V +102/01/23, 16:41 -
core-ci voted on patch set 17 V +1 02/01/23, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36890
-
Christian Kuhn uploaded patch set 18
V +102/01/23, 17:05 -
core-ci voted on patch set 18 V +1 02/01/23, 17:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36894
-
Christian Kuhn commented on patch set 18 CR -1 02/01/23, 17:20
codewise fine, smaller logic changes: * ask for maintainer first. if maintainer=yes, set admin automatically, don't ask admin flag, don't ask for groups * if maintainer=so, ask for admin, if admin=yes, don't ask for group * if admin=no, ask for group * in non-interactive: expect on maintainer=1+admin=0 as invalid combination -
Christian Kuhn commented on patch set 18 02/01/23, 17:37
Feature-99341-AddCliCreateBeUserCommand.rst:32we should add a hint here that declaring a password as environment variable is a potential security risk since such passwords then tend to end up in shell history files. that's one reason that ssh does not accept passphrase via env-var or similar ... btw: when a bash shell command starts with an empty space, it is *not* put into history, which we may want to document as well. unsure about other shells, though. maybe we should even change the example command to not emphasize the p/w env-var, but state that it *should* be always 'asked' as interactive mode. -
Jochen Roth uploaded patch set 19
CR -1V +102/01/23, 22:20 -
Jochen Roth commented on patch set 19 02/01/23, 22:31
Reply
Done. > in non-interactive: expect on maintainer=1+admin=0 as invalid combination The admin flag is set to true, if maintainer was set. This leads to the situation where this does not make sense to me, because the values are silently changed to the required values.Feature-99341-AddCliCreateBeUserCommand.rst:32Reply* Removed the "simple example" * Added warning in the feature rst * Password remove from command example -
core-ci voted on patch set 19 V -1 02/01/23, 23:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36900
-
Jochen Roth uploaded patch set 20
V -102/01/23, 23:35 -
core-ci voted on patch set 20 V +1 02/01/23, 23:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36901
-
Jochen Roth uploaded patch set 21
V +102/02/23, 11:55 -
core-ci voted on patch set 21 V +1 02/02/23, 12:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36921
-
Christian Kuhn uploaded patch set 22
V +102/03/23, 12:34 -
core-ci voted on patch set 22 V +1 02/03/23, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36984
-
Christian Kuhn voted on patch set 22 V +1 CR +1 02/03/23, 12:44
-
Benni Mack voted on patch set 22 V +1 CR +1 02/03/23, 12:49
-
Christian Kuhn voted on patch set 22 V +2 CR +2 02/03/23, 12:50
-
Christian Kuhn merged patch set 23 02/03/23, 12:50
CreateBackendUserCommand.php:178