use env for maintenance mode to avoid DB roundtrip

This commit is contained in:
simon lehericey 2021-04-06 12:21:49 +02:00
parent 1715a4899f
commit 6f2b2c3c1f
3 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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"

View file

@ -34,7 +34,6 @@ features = [
:insee_api_v3,
:instructeur_bypass_email_login_token,
:localization,
:maintenance_mode,
:make_experts_notifiable,
:mini_profiler,
:procedure_routage_api,