mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-25 20:51:30 -08:00
Only offer the 2FA reset if the user already has 2FA set up
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
5ed2bd0fb7
commit
945e8b402f
|
@ -499,6 +499,7 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if ((Auth::user()->isSuperUser()) && ($user->two_factor_active_and_enrolled()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
|
||||||
<!-- Reset Two Factor -->
|
<!-- Reset Two Factor -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||||
|
@ -513,6 +514,8 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
<!-- Groups -->
|
<!-- Groups -->
|
||||||
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
|
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
|
||||||
<label class="col-md-3 control-label" for="groups[]"> {{ trans('general.groups') }}</label>
|
<label class="col-md-3 control-label" for="groups[]"> {{ trans('general.groups') }}</label>
|
||||||
|
|
|
@ -597,7 +597,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
|
@if ((Auth::user()->isSuperUser()) && ($user->two_factor_active_and_enrolled()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
|
||||||
|
|
||||||
<!-- 2FA reset -->
|
<!-- 2FA reset -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
Loading…
Reference in a new issue