forked from External/greenlight
Added back ability to set maintenance window through env variables (#2089)
This commit is contained in:
@ -84,10 +84,10 @@ class ApplicationController < ActionController::Base
|
||||
help: I18n.t("errors.maintenance.help"),
|
||||
}
|
||||
end
|
||||
if @settings.get_value("Maintenance Banner").present?
|
||||
unless cookies[:maintenance_window] == @settings.get_value("Maintenance Banner")
|
||||
flash.now[:maintenance] = @settings.get_value("Maintenance Banner")
|
||||
end
|
||||
|
||||
maintenance_string = @settings.get_value("Maintenance Banner").presence || Rails.configuration.maintenance_window
|
||||
if maintenance_string.present?
|
||||
flash.now[:maintenance] = maintenance_string unless cookies[:maintenance_window] == maintenance_string
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user