Skip to content

Bug: spark cli does not assign a default group to newly created user #998

@bgeneto

Description

@bgeneto

PHP Version

8.2.14

CodeIgniter4 Version

4.4.4

Shield Version

dev

Which operating systems have you tested for this bug?

Windows, Linux

Which server did you use?

apache

Database

MariaDB 10.2

Did you customize Shield?

No

What happened?

While creating a new user from the cli, the php spark shield:user create command does not assign any group to the user (if not using the group option/parameter).
I think the command should assign a default group to the newly created user by using the following setting: config(\Config\AuthGroups::class)->defaultGroup in order to avoid possible permissions issues at the first login attempt.

Steps to Reproduce

php spark shield:user create

Username : bgeneto
Email : bgeneto@mail.com
Password : *******
Password confirmation : *******
User "bgeneto" created

Expected Output

A corresponding line in the auth_groups_users table using the default group from config(\Config\AuthGroups::class)->defaultGroup.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions