cschiewek/devise_ldap_authenticatable — pull request #132 by riverock (2013-05-30 22:23:09+00:00)
Title: Fixed bug in the in_group? method of the LdapConnect class

Hello,

I found a bug in the in_group? method of the LdapConnect class, and this pull request is a fix for that bug. This method wasn't handling the case where the group passed to it does not exist within LDAP. It was incorrectly returning true in this case.

My specific scenario is that I'm calling the Devise::LdapAdapter.in_ldap_group? method directly from my User model to determine if a user belongs to a specified group, and it's possible in my app for a non-existent group to be specified.

Please consider pulling my fix into your repo.

Thanks,
Denis