mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added the ability to remove an MFA method
Includes testing to cover
This commit is contained in:
@ -49,6 +49,7 @@ return [
|
||||
|
||||
// MFA
|
||||
'mfa_setup_method_notification' => 'Multi-factor method successfully configured',
|
||||
'mfa_remove_method_notification' => 'Multi-factor method successfully removed',
|
||||
|
||||
// Other
|
||||
'commented_on' => 'commented on',
|
||||
|
@ -181,6 +181,10 @@ body.flexbox {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -26,6 +26,17 @@
|
||||
Already configured
|
||||
</div>
|
||||
<a href="{{ url('/mfa/totp-generate') }}" class="button outline small">Reconfigure</a>
|
||||
<div component="dropdown" class="inline relative">
|
||||
<button type="button" refs="dropdown@toggle" class="button outline small">Remove</button>
|
||||
<div refs="dropdown@menu" class="dropdown-menu">
|
||||
<p class="text-neg small px-m mb-xs">Are you sure you want to remove this multi-factor authentication method?</p>
|
||||
<form action="{{ url('/mfa/remove/totp') }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('delete') }}
|
||||
<button class="text-primary small delete">{{ trans('common.confirm') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<a href="{{ url('/mfa/totp-generate') }}" class="button outline">Setup</a>
|
||||
@endif
|
||||
@ -47,6 +58,17 @@
|
||||
Already configured
|
||||
</div>
|
||||
<a href="{{ url('/mfa/backup-codes-generate') }}" class="button outline small">Reconfigure</a>
|
||||
<div component="dropdown" class="inline relative">
|
||||
<button type="button" refs="dropdown@toggle" class="button outline small">Remove</button>
|
||||
<div refs="dropdown@menu" class="dropdown-menu">
|
||||
<p class="text-neg small px-m mb-xs">Are you sure you want to remove this multi-factor authentication method?</p>
|
||||
<form action="{{ url('/mfa/remove/backup_codes') }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('delete') }}
|
||||
<button class="text-primary small delete">{{ trans('common.confirm') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<a href="{{ url('/mfa/backup-codes-generate') }}" class="button outline">Setup</a>
|
||||
@endif
|
||||
|
Reference in New Issue
Block a user