Commit 43e7056e authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Display 2fregisters link only if at once a 2f device is registered (#1383)

parent 6cca6a86
......@@ -94,9 +94,15 @@ sub params {
$req->param("tab") // '' )
|| "applist";
}
$res{DISPLAY_MODULES} = $self->displayModules($req);
$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+/;
$self->logger->debug( "Display 2fRegisters link ? ". $res{SFAManagment} );
return %res;
}
......
......@@ -74,10 +74,12 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="/2fregisters">
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/2FManagment.png" width="16" height="16" alt="refresh" />
<span trspan="2FManagment">2FManagment</span>
</a></li>
<TMPL_IF NAME="SFAManagment">
<li><a href="/2fregisters">
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/2FManagment.png" width="16" height="16" alt="refresh" />
<span trspan="2FManagment">2FManagment</span>
</a></li>
</TMPL_IF>
<li><a href="/refresh">
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/arrow_refresh.png" width="16" height="16" alt="refresh" />
<span trspan="refreshrights">Refresh</span>
......
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