Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: [AdminBundle] #15890 Introduce sylius:admin-user:list command #15946

Open
wants to merge 2 commits into
base: 1.13
Choose a base branch
from

Conversation

crydotsnake
Copy link
Contributor

@crydotsnake crydotsnake commented Mar 4, 2024

Q A
Branch? 1.13.
Bug fix? no.
New feature? yes.
BC breaks? no.
Deprecations? no
Related tickets fixes #15890
License MIT

Description:

As described in: #15890

This pull request introduces a new CLI command:

bin/console sylius:admin-users:list

By default all available admin users are listed, and each data of a user is showed in a table:

SCR-20240304-nxdu

If you want to see only one admin user, you can use the --username option:

bin/console sylius:admin-user:list --username simon

Any feedback or improvement ideas are much appreciated!

@crydotsnake crydotsnake requested a review from a team as a code owner March 4, 2024 14:46
@probot-autolabeler probot-autolabeler bot added the Admin AdminBundle related issues and PRs. label Mar 4, 2024
Copy link

github-actions bot commented Mar 4, 2024

Bunnyshell Preview Environment deployment failed

Check https://github.com/Sylius/Sylius/actions/runs/8143979577 for details.

Available commands:

  • /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@crydotsnake
Copy link
Contributor Author

crydotsnake commented Mar 4, 2024

By default, all available admin users will be display. But you can also show only one admin user with the --username argument:

cfd5505

SCR-20240304-pqrf

@crydotsnake crydotsnake changed the title FEATURE: [AdminBundle] #15890 Introduce sylius:admin-users:list command FEATURE: [AdminBundle] #15890 Introduce sylius:admin-user:list command Mar 4, 2024
Copy link
Contributor

@Rafikooo Rafikooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @crydotsnake for another contribution,
It would be awesome if you could try to test this feature, you can refer to how we tested other, similar CLI command here: https://github.com/Sylius/Sylius/pull/14571/files#diff-0cc123576bf137514df3bef27330b372df9d5016c6e3a27cbe1c29338934e1d5R26

@crydotsnake
Copy link
Contributor Author

crydotsnake commented Mar 4, 2024

Thank you @crydotsnake for another contribution,

It would be awesome if you could try to test this feature, you can refer to how we tested other, similar CLI command here: https://github.com/Sylius/Sylius/pull/14571/files#diff-0cc123576bf137514df3bef27330b372df9d5016c6e3a27cbe1c29338934e1d5R26

Yes. Good point 🤦🏼‍♂️ will take a look at it. A test for #15889 would be good aswell..

Comment on lines +76 to +91
$this->io->table(
[
'ID', 'E-Mail', 'Username', 'First name', 'Last name', 'Locale code', 'Enabled',
],
[
[
$adminUser->getId(),
$adminUser->getEmail(),
$adminUser->getUsername(),
$adminUser->getFirstname() ?? 'No Firstname Set',
$adminUser->getLastName() ?? 'No Lastname Set',
$adminUser->getLocaleCode(),
$adminUser->isEnabled() ? 'Enabled' : 'Disabled',
],
],
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could call the ::listSingleAdminUser here instead. It seems the content is the same 👋

@Rafikooo
Copy link
Contributor

Hello @crydotsnake, are you still interested in completing this task? We want to incorporate this feature, however, Sylius 1.13-RC version has been released, so this pull request should now be directed to the 2.0 branch 💃

@crydotsnake
Copy link
Contributor Author

Hello @crydotsnake, are you still interested in completing this task? We want to incorporate this feature, however, Sylius 1.13-RC version has been released, so this pull request should now be directed to the 2.0 branch 💃

Hello @Rafikooo !

Yes, i'm. But i had no time to work on the tests so far 😓.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CLI FEATURE] Command for list available admin users
3 participants