shield icon indicating copy to clipboard operation
shield copied to clipboard

fix: `shield:user create` with default group

Open datamweb opened this issue 1 year ago • 8 comments

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

datamweb avatar Jan 12 '24 20:01 datamweb

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.

datamweb avatar Jan 12 '24 21:01 datamweb

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?

lonnieezell avatar Jan 14 '24 04:01 lonnieezell

@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

samsonasik avatar Jan 14 '24 04:01 samsonasik

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.

datamweb avatar Jan 16 '24 01:01 datamweb

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 ?

bgeneto avatar Jan 17 '24 12:01 bgeneto

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.

datamweb avatar Jan 19 '24 03:01 datamweb

Sorry - forgot to reply here earlier, but PRLintReloaded is installed and should be working now.

lonnieezell avatar Jan 19 '24 04:01 lonnieezell

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 .

datamweb avatar Jan 19 '24 04:01 datamweb

Closed by #1162

kenjis avatar Aug 21 '24 07:08 kenjis