mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Prevent change of password of SAML users via CLI
This commit is contained in:
parent
60f926924b
commit
e064ee4263
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,11 @@ class SetPasswordCommand extends Command
|
||||||
|
|
||||||
$io->note('User found!');
|
$io->note('User found!');
|
||||||
|
|
||||||
|
if ($user->isSamlUser()) {
|
||||||
|
$io->error('This user is a SAML user, so you can not change the password!');
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
$proceed = $io->confirm(
|
$proceed = $io->confirm(
|
||||||
sprintf('You are going to change the password of %s with ID %d. Proceed?',
|
sprintf('You are going to change the password of %s with ID %d. Proceed?',
|
||||||
$user->getFullName(true), $user->getID()));
|
$user->getFullName(true), $user->getID()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue