The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

22 satır
465 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class TwoFactorAuthenticationsController < BaseController
  4. before_action :set_target_user
  5. def destroy
  6. authorize @user, :disable_2fa?
  7. @user.disable_two_factor!
  8. log_action :disable_2fa, @user
  9. UserMailer.two_factor_disabled(@user).deliver_later!
  10. redirect_to admin_accounts_path
  11. end
  12. private
  13. def set_target_user
  14. @user = User.find(params[:user_id])
  15. end
  16. end
  17. end