[pve-devel] SPAM: [PATCH pve-access-control 1/1] Fixed #3686: User Removing Failure
Jasper Yu
007seadog at gmail.com
Tue Oct 19 20:50:23 CEST 2021
From: Li-Heng Yu <007seadog at gmail.com>
Signed-off-by: Li-Heng Yu <007seadog at 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
More information about the pve-devel
mailing list