Add admin MFA enforcement feature

This commit is contained in:
Fredys Fonseca 2025-07-17 06:36:28 +00:00
parent 4e1d61ecd0
commit 16b19f48cc
3 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,7 @@ class ApplicationController < ActionController::Base
include DatabaseHelper include DatabaseHelper
include AuthorizedFetchHelper include AuthorizedFetchHelper
include SelfDestructHelper include SelfDestructHelper
include MfaForceConcern
helper_method :current_account helper_method :current_account
helper_method :current_session helper_method :current_session

View File

@ -2,6 +2,6 @@
module FlashesHelper module FlashesHelper
def user_facing_flashes def user_facing_flashes
flash.to_hash.slice('alert', 'error', 'notice', 'success') flash.to_hash.slice('alert', 'error', 'notice', 'success', 'warning')
end end
end end

View File

@ -10,6 +10,7 @@ RSpec.describe FlashesHelper do
flash[:error] = 'an error' flash[:error] = 'an error'
flash[:notice] = 'a notice' flash[:notice] = 'a notice'
flash[:success] = 'a success' flash[:success] = 'a success'
flash[:warning] = 'a warning'
flash[:not_user_facing] = 'a not user facing flash' flash[:not_user_facing] = 'a not user facing flash'
# rubocop:enable Rails/I18nLocaleTexts # rubocop:enable Rails/I18nLocaleTexts
end end
@ -19,7 +20,8 @@ RSpec.describe FlashesHelper do
'alert' => 'an alert', 'alert' => 'an alert',
'error' => 'an error', 'error' => 'an error',
'notice' => 'a notice', 'notice' => 'a notice',
'success' => 'a success' 'success' => 'a success',
'warning' => 'a warning'
) )
end end
end end