theforeman/foreman — pull request #295 by AbbyEdwards (2012-12-10 20:49:55+00:00)
Title: fixed bug preventing LDAP authentication in auth_source_ldap model

The logic for determining which password to send the LDAP server
was inverted in the search_for_user_entries method. To address,
I made two changes. First, I inverted the logic of the
use_user_login_for_auth? method so it returns true when we are
using the user login for auth. Next, I updated the single reference
to use_user_login_for_auth? to swap the true false values on the
ternary operator in the effective_user method so it continued
to function the same way. Finally, I updated the "pass =" line
in search_for_user_entries to use the use_user_login_for_auth?
check and made sure the appropriate values were on the correct
sides of the : symbol. I can LDAP auth again, hooray!