This commit is contained in:
Maxime Besson 2022-03-29 23:08:02 +02:00
parent cc5435015d
commit 21745359a2
1 changed files with 7 additions and 8 deletions

View File

@ -509,14 +509,6 @@ sub _displayRegister {
}
}
return [ 302, [ Location => $self->conf->{portal} . $am[0]->{URL} ], [] ]
if (
@am == 1
and not( $req->userData->{_2fDevices}
&& $req->userData->{_2fDevices} =~ /\w+/
or $req->data->{sfRegRequired} )
);
# Retrieve user all second factors
my $_2fDevices = [];
unless ( $self->canUpdateSfa($req) ) {
@ -534,6 +526,13 @@ sub _displayRegister {
$self->userLogger->warn("Do not display 2F devices!");
}
return [ 302, [ Location => $self->conf->{portal} . $am[0]->{URL} ], [] ]
if (
@am == 1
and not( @$_2fDevices
or $req->data->{sfRegRequired} )
);
# Parse second factors to display delete button if allowed and upgrade button
my $displayUpgBtn = 0;
my $action = '';