mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
ECP-170 Remove login requirement for Trition. Switch to using predefined passwords stored in the database for district login.
This commit is contained in:
parent
72e38f5ee8
commit
2068758ae4
15 changed files with 146 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue