diff options
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/two_factor_authentications_controller.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/admin/two_factor_authentications_controller.rb b/app/controllers/admin/two_factor_authentications_controller.rb new file mode 100644 index 000000000..69c08f605 --- /dev/null +++ b/app/controllers/admin/two_factor_authentications_controller.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Admin + class TwoFactorAuthenticationsController < BaseController + before_action :set_user + + def destroy + @user.disable_two_factor! + redirect_to admin_accounts_path + end + + private + + def set_user + @user = User.find(params[:user_id]) + end + end +end |