feat: add force password reset feature
This commit is contained in:
@@ -15,6 +15,30 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<x-modal id="resetAccountPasswordModal" modal-label="resetAccountPassword" modal-title="{{ __('Confirm your password') }}" include-close-button="true">
|
||||
|
||||
<p>{{ __('Please confirm that you want to invalidate this account\'s password. Since this is a sensitive operation, you\'ll need to confirm your own password and provide a 2FA code, if enabled.') }}</p>
|
||||
|
||||
<form id="resetAccountPasswordForm" method="POST" action="{{ route('force-reset-user', ['user' => $user]) }}">
|
||||
@csrf
|
||||
@method('patch')
|
||||
|
||||
<x-confirm-password>
|
||||
{{ __('Re-entering your password is required to confirm sensitive administration actions.') }}
|
||||
</x-confirm-password>
|
||||
|
||||
<x-confirm-second-factor>
|
||||
{{ __('Two-factor authentication is required to confirm sensitive administration actions.') }}
|
||||
</x-confirm-second-factor>
|
||||
|
||||
</form>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
<button onclick="$('#resetAccountPasswordForm').submit()" type="button" class="btn btn-warning"><i class="fas fa-check"></i> {{ __('Re-authenticate and confirm') }}</button>
|
||||
</x-slot>
|
||||
|
||||
</x-modal>
|
||||
|
||||
<x-modal id="banAccountModal" modal-label="banAccount" modal-title="{{__('Please confirm')}}" include-close-button="true">
|
||||
|
||||
<p>{{__("Please confirm that you want to suspend this account. You'll need to add a reason and expiration date to confirm this.")}}</p>
|
||||
@@ -363,7 +387,7 @@
|
||||
<button type="submit" class="btn btn-success mr-2"><i class="fas fa-user"></i> {{ __('Unsuspend account') }}</button>
|
||||
</form>
|
||||
@endif
|
||||
<button class="btn-danger btn mr-3" type="button"><i class="fas fa-key"></i> {{ __('Force password reset') }}</button>
|
||||
<button onclick="$('#resetAccountPasswordModal').modal('show')" class="btn-danger btn mr-3" type="button"><i class="fas fa-key"></i> {{ __('Force password reset') }}</button>
|
||||
<button class="btn-danger btn mr-3" type="button"><i class="fas fa-unlock"></i> {{ __('Reset MFA') }}</button>
|
||||
<button onclick="$('#deleteAccount').modal('show')" type="button" class="btn btn-danger"><i class="fas fa-trash"></i> {{ __('Delete account') }}</button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user