[pve-devel] SPAM: [PATCH pve-access-control 1/1] Fixed #3686: User Removing Failure

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Nov 5 07:26:31 CET 2021


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

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!





More information about the pve-devel mailing list