fix: `shield:user create` with default group
Description fix: #998
The user registration form sets the default group value for the user when a new user is registered. Although I don't consider this a bug, I prefer that this process be done for command shield:user create as well.
Checklist:
- [x] Securely signed commits
- [x] Component(s) with PHPDoc blocks, only if necessary or adds value
- [x] Unit testing, with >80% coverage
- [ ] User guide updated
- [x] Conforms to style guide
Two items. I don't know why Rector has not been updated to the latest version by Dependabot. Maybe it's because of the changes in Devkit. @samsonasik please take a look if you can.
PRLintReloaded It requires configuration, which I do not have the necessary access to do, please do the necessary configuration.
In the future I'd rather see all of the unrelated fixes in a separate PR. I know Rector was being a pain though.
While I like the idea, I think in the situations I'd be using it from the command line I'd rather be able to define which role during the creation process, instead of being forced into the default and then having to go to the database to change it.
What do you think about reading the available roles from the config file and presenting that as a required choice to the user?
@datamweb it probably related with dependabot config, 0.18.x probably only call 0.18.y, while 0.19.a need to be triggerable on specific config. CodeIgniter4 repo seems auto-update it
What do you think about reading the available roles from the config file and presenting that as a required choice to the user?
Good idea, I'd like to come back to these PR at another time.
What do you think about reading
One can also make the -g argument available in the create action in order to set the user group otherwise use the default if not informed. This way we simplify the code and minimize the interactions while creating a new user via cli. What do you think @lonnieezell ?
PRLintReloaded It requires configuration, which I do not have the necessary access to do, please do the necessary configuration.
I send PR #1001 for add Rules.
Sorry - forgot to reply here earlier, but PRLintReloaded is installed and should be working now.
In the future I'd rather see all of the unrelated fixes in a separate PR
I sent separates PRs for fix #1002 , #1003 and #1004 .
Closed by #1162