|
|
|
@ -3,6 +3,7 @@ module ::TwoFactorAuthentication |
|
|
|
|
|
|
|
|
|
before_action :require_admin |
|
|
|
|
before_action :check_enabled |
|
|
|
|
before_action :check_ee |
|
|
|
|
|
|
|
|
|
layout 'admin' |
|
|
|
|
menu_item :two_factor_authentication |
|
|
|
@ -48,6 +49,12 @@ module ::TwoFactorAuthentication |
|
|
|
|
render_403 unless manager.configurable_by_ui? |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def check_ee |
|
|
|
|
unless EnterpriseToken.allows_to?(:two_factor_authentication) |
|
|
|
|
render template: 'two_factor_authentication/upsale' |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def manager |
|
|
|
|
::OpenProject::TwoFactorAuthentication::TokenStrategyManager |
|
|
|
|
end |
|
|
|
|