Signed-off-by: Li-Heng Yu <007sea...@gmail.com> --- src/PVE/AccessControl.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index fcb16bd..0d2c6c0 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/AccessControl.pm @@ -1628,7 +1628,10 @@ sub user_set_tfa { die "realm '$realm' does not allow removing the 2nd factor\n" if defined($user); } } else { - die "user '$userid' not found\n" if !defined($user); + # Remove user in non-TFA-enforcement realm + if (defined($data)) { + die "user '$userid' not found\n" if !defined($user); + } # Without a realm-enforced TFA setting the user can add a u2f or totp entry by themselves. # The 'yubico' type requires yubico server settings, which have to be configured on the # realm, so this is not supported here: -- 2.28.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel