mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 10:18:56 +02:00
Show the disabled status of a user in the users:list command
This commit is contained in:
parent
37fde77b8e
commit
27709bed60
3 changed files with 4 additions and 3 deletions
|
@ -56,7 +56,7 @@ use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||||
|
|
||||||
class SetPasswordCommand extends Command
|
class SetPasswordCommand extends Command
|
||||||
{
|
{
|
||||||
protected static $defaultName = 'partdb:users:set-password|app:set-password|users:set-password';
|
protected static $defaultName = 'partdb:users:set-password|app:set-password|users:set-password|partdb:user:set-password';
|
||||||
|
|
||||||
protected EntityManagerInterface $entityManager;
|
protected EntityManagerInterface $entityManager;
|
||||||
protected UserPasswordHasherInterface $encoder;
|
protected UserPasswordHasherInterface $encoder;
|
||||||
|
|
|
@ -43,7 +43,7 @@ class UserListCommand extends Command
|
||||||
$io->title('Users:');
|
$io->title('Users:');
|
||||||
|
|
||||||
$table = new Table($output);
|
$table = new Table($output);
|
||||||
$table->setHeaders(['ID', 'Username', 'Name', 'Email', 'Group']);
|
$table->setHeaders(['ID', 'Username', 'Name', 'Email', 'Group', 'Login Disabled']);
|
||||||
|
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$table->addRow([
|
$table->addRow([
|
||||||
|
@ -52,6 +52,7 @@ class UserListCommand extends Command
|
||||||
$user->getFullName(),
|
$user->getFullName(),
|
||||||
$user->getEmail(),
|
$user->getEmail(),
|
||||||
$user->getGroup() !== null ? $user->getGroup()->getName() . ' (ID: ' . $user->getGroup()->getID() . ')' : 'No group',
|
$user->getGroup() !== null ? $user->getGroup()->getName() . ' (ID: ' . $user->getGroup()->getID() . ')' : 'No group',
|
||||||
|
$user->isDisabled() ? 'Yes' : 'No',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class UsersPermissionsCommand extends Command
|
class UsersPermissionsCommand extends Command
|
||||||
{
|
{
|
||||||
protected static $defaultName = 'partdb:users:permissions';
|
protected static $defaultName = 'partdb:users:permissions|partdb:user:permissions';
|
||||||
protected static $defaultDescription = 'View and edit the permissions of a given user';
|
protected static $defaultDescription = 'View and edit the permissions of a given user';
|
||||||
|
|
||||||
protected EntityManagerInterface $entityManager;
|
protected EntityManagerInterface $entityManager;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue