diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5dcc24424..c5a9b8fc9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base before_action :set_current_roles before_action :set_sentry_user before_action :redirect_if_untrusted - before_action :reject, if: -> { feature_enabled?(:maintenance_mode) } + before_action :reject, if: -> { ENV.fetch("MAINTENANCE_MODE", 'false') == 'true' } before_action :configure_permitted_parameters, if: :devise_controller? before_action :staging_authenticate diff --git a/config/env.example.optional b/config/env.example.optional index 8420512d0..79c507f2b 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -67,3 +67,5 @@ DS_ENV="staging" # Personnalisation d'instance - fichier utilisé pour poser un filigrane sur les pièces d'identité # WATERMARK_FILE="" +# Active le mode maintenance +# MAINTENANCE_MODE="true" diff --git a/config/initializers/flipper.rb b/config/initializers/flipper.rb index 6fc82f6ed..ea9b7cefb 100644 --- a/config/initializers/flipper.rb +++ b/config/initializers/flipper.rb @@ -34,7 +34,6 @@ features = [ :insee_api_v3, :instructeur_bypass_email_login_token, :localization, - :maintenance_mode, :make_experts_notifiable, :mini_profiler, :procedure_routage_api,