mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-06-12 17:00:31 +00:00
add test if user exists
This commit is contained in:
parent
d8a56966bc
commit
66b7e98db9
@ -153,6 +153,10 @@ __PACKAGE__->register_method ({
|
|||||||
($tmp eq 'root@pam' || $tmp eq $username)) {
|
($tmp eq 'root@pam' || $tmp eq $username)) {
|
||||||
# got valid ticket
|
# got valid ticket
|
||||||
# Note: root@pam can create tickets for other users
|
# Note: root@pam can create tickets for other users
|
||||||
|
|
||||||
|
# test if user exists and is enabled
|
||||||
|
my $usercfg = cfs_read_file('user.cfg');
|
||||||
|
die "no such user ('$username')\n" if !user_enabled($usercfg, $username);
|
||||||
} else {
|
} else {
|
||||||
$username = PVE::AccessControl::authenticate_user($username, $param->{password});
|
$username = PVE::AccessControl::authenticate_user($username, $param->{password});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user