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! --- config/locales/en.yml | 1 + config/routes.rb | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index ccf231cd8..26ecac7bc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -84,6 +84,7 @@ en: public: Public push_subscription_expires: PuSH subscription expires reset_password: Reset password + disable_two_factor_authentication: Disable 2FA salmon_url: Salmon URL show: created_reports: Reports created by this account diff --git a/config/routes.rb b/config/routes.rb index 9adaffcaf..1492f99fb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -89,6 +89,10 @@ Rails.application.routes.draw do resource :suspension, only: [:create, :destroy] resource :confirmation, only: [:create] end + + resources :users, only: [] do + resource :two_factor_authentication, only: [:destroy] + end end get '/admin', to: redirect('/admin/settings', status: 302) -- cgit