From 7880671f3527b80de891053beaeae4a8a22c8c58 Mon Sep 17 00:00:00 2001 From: Kaylee Date: Tue, 2 May 2017 20:07:12 +0100 Subject: Add option to disable two factor auth in admin accounts panel. (#2584) * Add option to disable two factor auth in admin accounts panel. Closes #2578 * Add @mjankowski's suggestions. * Moves destroy actions behind User#disable_two_factor! * Adds spec coverage for Admin:TwoFactorAuthenticationsController and User#disable_two_factor! --- app/views/admin/accounts/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views/admin/accounts/show.html.haml') diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index 0b3348960..1a9bd2c48 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -70,6 +70,8 @@ - if @account.local? %div{ style: 'float: right' } = 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' %div{ style: 'float: left' } - if @account.silenced? -- cgit