ECP-170 Remove login requirement for Trition. Switch to using predefined passwords stored in the database for district login.

This commit is contained in:
rebuilt 2025-06-11 13:54:56 -07:00
parent 72e38f5ee8
commit 2068758ae4
15 changed files with 146 additions and 16 deletions

View file

@ -10,7 +10,7 @@ class SqmApplicationController < ApplicationController
private
def authenticate_district
authenticate(district_name, "#{district_name}!")
authenticate(@district.username, @district.password)
end
def district_name
@ -35,6 +35,8 @@ class SqmApplicationController < ApplicationController
end
def authenticate(username, password)
return unless @district.login_required
authenticate_or_request_with_http_basic do |u, p|
u == username && p == password
end