app/controllers/logins_controller.rb
# Development tool for logging in without a password
Development tool for logging in without a password
Development tool for logging in without a password
def create_backdoor
    unless Rails.env.development?
      redirect_to logout_path
      return
    end
    uid = params[:username].downcase
    if Employee.find_by_uid(uid) || Employee.ldap_create(uid)
      session[:cas_user] = uid
      redirect_to home_pages_path
      return
    else
      redirect_to new_logins_backdoor_path
    end
  end
def create_backdoor unless Rails . env . development? redirect_to logout_path return end uid = params [ :username ] . downcase if Employee . find_by_uid ( uid ) || Employee . ldap_create ( uid ) session [ :cas_user ] = uid redirect_to home_pages_path return else redirect_to new_logins_backdoor_path end end
Development tool for logging in without a password
Development tool for logging in without a password