app/config_objects/per_district.rb
# This is used to mock an LDAP server for local development, test and for the demo site.
# The behavior here is different by districts.
This is used to mock an LDAP server for local development, test and for the demo site.
The behavior here is different by districts.
This is used to mock an LDAP server for local development test and for the demo site . The behavior here is different by districts .
def find_educator_for_mock_ldap_login(ldap_login)
    raise_not_handled! unless MockLDAP.should_use?
    if @district_key == BEDFORD
      login_name = ldap_login.split('@').first
      Educator.find_by_login_name(login_name)
    elsif @district_key == SOMERVILLE
      Educator.find_by_email(ldap_login)
    elsif @district_key == NEW_BEDFORD
      Educator.find_by_email(ldap_login)
    elsif @district_key == DEMO
      Educator.find_by_email(ldap_login)
    else
      raise_not_handled!
    end
  end
def find_educator_for_mock_ldap_login ( ldap_login ) raise_not_handled! unless MockLDAP . should_use? if @district_key == BEDFORD login_name = ldap_login . split ( '@' ) . first Educator . find_by_login_name ( login_name ) elsif @district_key == SOMERVILLE Educator . find_by_email ( ldap_login ) elsif @district_key == NEW_BEDFORD Educator . find_by_email ( ldap_login ) elsif @district_key == DEMO Educator . find_by_email ( ldap_login ) else raise_not_handled! end end
This is used to mock an LDAP server for local development, test and for the demo site.
This is used to mock an LDAP server for local development test and for the demo site .
ldap_login
<not_specific>