public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Jasper Yu <007seadog@gmail.com>
Subject: Re: [pve-devel] SPAM: [PATCH pve-access-control 1/1] Fixed #3686: User Removing Failure
Date: Fri, 5 Nov 2021 07:26:31 +0100	[thread overview]
Message-ID: <6f2414f4-4e0f-fe8d-d4e6-fc8c202a32e0@proxmox.com> (raw)
In-Reply-To: <20211019185023.65276-2-007seadog@gmail.com>

On 19.10.21 20:50, Jasper Yu wrote:
> From: Li-Heng Yu <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:
> 

just for the record, it seems Dominik beat you to it by a few hours, same approach
different syntax:

https://lists.proxmox.com/pipermail/pve-devel/2021-October/050443.html

Thanks for your contribution effort nonetheless though!




      reply	other threads:[~2021-11-05  6:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 18:50 [pve-devel] SPAM: [PATCH pve-access-control 0/1] Fixed user removing failure Jasper Yu
2021-10-19 18:50 ` [pve-devel] SPAM: [PATCH pve-access-control 1/1] Fixed #3686: User Removing Failure Jasper Yu
2021-11-05  6:26   ` Thomas Lamprecht [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=6f2414f4-4e0f-fe8d-d4e6-fc8c202a32e0@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=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