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