sqm-dashboards/app/controllers/legacy/application_controller.rb
Nelson Jovel ad03606d66 Add benchmarks to survey and admin data items. Remove them from measures. Modify seeder
Calculate benchmarks for measures based on a weighted average of survey
and admin data items

Added architectural records
2021-12-28 14:10:34 +01:00

22 lines
571 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.'
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