public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jasper Yu <007seadog@gmail.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] SPAM: [PATCH container 1/1] Fixed #3686: User Removing Failure
Date: Wed, 20 Oct 2021 02:49:10 +0800	[thread overview]
Message-ID: <20211019184910.64864-2-007seadog@gmail.com> (raw)
In-Reply-To: <20211019184910.64864-1-007seadog@gmail.com>

Signed-off-by: Li-Heng Yu <007seadog@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




      reply	other threads:[~2021-10-20 16:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 18:49 [pve-devel] SPAM: [PATCH pve-access-control 0/1] Fixed user removing failure Jasper Yu
2021-10-19 18:49 ` Jasper Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211019184910.64864-2-007seadog@gmail.com \
    --to=007seadog@gmail.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal