mirror of
git://git.proxmox.com/git/pve-access-control.git
synced 2025-01-22 22:03:46 +03:00
user check: fix expiration/enable order
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
79ae250ff9
commit
d0cce79f8b
@ -653,15 +653,15 @@ sub check_user_enabled {
|
||||
my $data = check_user_exist($usercfg, $username, $noerr);
|
||||
return undef if !$data;
|
||||
|
||||
return 1 if $data->{enable};
|
||||
|
||||
die "user '$username' is disabled\n" if !$noerr;
|
||||
|
||||
my $ctime = time();
|
||||
my $expire = $usercfg->{users}->{$username}->{expire};
|
||||
|
||||
die "account expired\n" if $expire && ($expire < $ctime);
|
||||
|
||||
return 1 if $data->{enable};
|
||||
|
||||
die "user '$username' is disabled\n" if !$noerr;
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user