Commit 251f8986 authored by Xavier Guimard's avatar Xavier Guimard

Merge branch 'llng-2.0-improvements' into 'master'

Replace regex by display2fRegisters method

See merge request lemonldap-ng/lemonldap-ng!31
parents 9b584d95 388bd387
......@@ -99,9 +99,8 @@ sub params {
$res{AUTH_ERROR_TYPE} =
$req->error_type( $res{AUTH_ERROR} = $req->menuError );
# Display menu 2fRegisters link only if a 2F device is registered
# $res{SFAManagment} = $self->_sfEngine->display2fRegisters($req, $req->userData) ???
$res{SFAManagment} = $req->userData->{_2fDevices} =~ /\w+/;
# Display menu 2fRegisters link only if at least a 2F device is registered
$res{SFAManagment} = $self->p->_sfEngine->display2fRegisters($req, $req->userData);
$self->logger->debug( "Display 2fRegisters link ? ". $res{SFAManagment} );
return %res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment