mirror of
git://git.proxmox.com/git/pve-access-control.git
synced 2025-01-20 14:03:43 +03:00
update tfa cleanup when deleting users
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
8c1e3ab3e9
commit
d168ab34d6
@ -453,7 +453,7 @@ __PACKAGE__->register_method ({
|
||||
|
||||
my $partial_deletion = '';
|
||||
eval {
|
||||
PVE::AccessControl::user_set_tfa($userid, $realm, undef, undef, $usercfg, $domain_cfg);
|
||||
PVE::AccessControl::user_remove_tfa($userid);
|
||||
$partial_deletion = ' - but deleted related TFA';
|
||||
|
||||
PVE::AccessControl::delete_user_group($userid, $usercfg);
|
||||
|
@ -1740,6 +1740,16 @@ sub assert_new_tfa_config_available() {
|
||||
# FIXME: Assert cluster-wide new-tfa-config support!
|
||||
}
|
||||
|
||||
sub user_remove_tfa : prototype($) {
|
||||
my ($userid) = @_;
|
||||
|
||||
assert_new_tfa_config_available();
|
||||
|
||||
my $tfa_cfg = cfs_read_file('priv/tfa.cfg');
|
||||
$tfa_cfg->remove_user($userid);
|
||||
cfs_write_file('priv/tfa.cfg', $tfa_cfg);
|
||||
}
|
||||
|
||||
sub user_get_tfa : prototype($$$) {
|
||||
my ($username, $realm, $new_format) = @_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user