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 AuthorizedFetchHelper
include SelfDestructHelper
include MfaForceConcern
helper_method :current_account
helper_method :current_session

View File

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

View File

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