mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Add admin MFA enforcement feature
This commit is contained in:
parent
4e1d61ecd0
commit
16b19f48cc
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user