Merge pull request #6454 from pengfeidong/6453_enable_disable_otp
Ajout d'une variable d'environnement pour désactiver l'OTP des Super-Admin (#6454)
This commit is contained in:
commit
d5425401f3
3 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,7 @@ module Manager
|
|||
if super_admin_signed_in? && current_super_admin.otp_required_for_login?
|
||||
super
|
||||
elsif super_admin_signed_in?
|
||||
redirect_to edit_super_admin_otp_path
|
||||
SUPER_ADMIN_OTP_ENABLED ? (redirect_to edit_super_admin_otp_path) : super
|
||||
else
|
||||
redirect_to new_super_admin_session_path
|
||||
end
|
||||
|
|
|
@ -72,3 +72,6 @@ DS_ENV="staging"
|
|||
|
||||
# Active la localisation
|
||||
# LOCALIZATION_ENABLED="true"
|
||||
|
||||
# Désactivé l'OTP pour SuperAdmin
|
||||
# SUPER_ADMIN_OTP_ENABLED = "disabled" # "enabled" par défaut
|
||||
|
|
1
config/initializers/otp.rb
Normal file
1
config/initializers/otp.rb
Normal file
|
@ -0,0 +1 @@
|
|||
SUPER_ADMIN_OTP_ENABLED = ENV.fetch("SUPER_ADMIN_OTP_ENABLED", "enabled") == "enabled"
|
Loading…
Reference in a new issue