Add ability to disable login and mark accounts as memorial (#5615)

Fix #5597
This commit is contained in:
Eugen Rochko 2017-11-07 19:06:44 +01:00 committed by GitHub
parent cbbeec05be
commit 1032f3994f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 168 additions and 39 deletions

View file

@ -18,6 +18,15 @@
%tr
%th= t('admin.accounts.email')
%td= @account.user_email
%tr
%th= t('admin.accounts.login_status')
%td
- if @account.user&.disabled?
= t('admin.accounts.disabled')
= table_link_to 'unlock', t('admin.accounts.enable'), enable_admin_account_path(@account.id), method: :post
- else
= t('admin.accounts.enabled')
= table_link_to 'lock', t('admin.accounts.disable'), disable_admin_account_path(@account.id), method: :post
%tr
%th= t('admin.accounts.most_recent_ip')
%td= @account.user_current_sign_in_ip
@ -65,6 +74,8 @@
= link_to t('admin.accounts.reset_password'), admin_account_reset_path(@account.id), method: :create, class: 'button'
- if @account.user&.otp_required_for_login?
= link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button'
- unless @account.memorial?
= link_to t('admin.accounts.memorialize'), memorialize_admin_account_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'
- else
= link_to t('admin.accounts.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button'