In file lib/devise_ldap_authenticatable/ldap/connection.rb:213, method has_required_attribute_presence?
@required_attributes_presence.each do |key,val|
if val && !user.attribute_names.include?(key.to_sym)
DeviseLdapAuthenticatable::Logger.send("User #{dn} doesn't include attribute #{key}")
return false
elsif !val && user.attribute_names.include?(key.to_sym) # <= This looks like a wrong logic, run the method always get false.
DeviseLdapAuthenticatable::Logger.send("User #{dn} includes attribute #{key}")
return false
end
end
In file
lib/devise_ldap_authenticatable/ldap/connection.rb:213
, methodhas_required_attribute_presence?