sqm-dashboards/app/controllers/legacy/application_controller.rb
Liam Morley 6aa9f00adc Revert "Tie legacy analytics ID to environment"
This reverts commit 3e15194eff.

This will allow monitoring the new experience analytics to not be tampered by the
legacy analytics.
2021-12-02 09:35:33 -05:00

22 lines
577 B
Ruby

module Legacy
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception, prepend: true
layout "legacy/application"
def verify_admin
return true #if current_user.admin?(@school)
redirect_to root_path, notice: 'You must be logged in as an admin of that school to access that page.'
return false
end
def authenticate(username, password)
return true if username == "boston"
authenticate_or_request_with_http_basic do |u, p|
u == username && p == password
end
end
end
end