mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-06-11 08:38:20 +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)) {
|
||||
# got valid ticket
|
||||
# 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 {
|
||||
$username = PVE::AccessControl::authenticate_user($username, $param->{password});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user