1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

bug #4107: bug in ldap group code

Tested with net-ldap 0.8.0

(cherry picked from commit c825150c06a0994624fa86e4d09daf10fe1e4a4f)
This commit is contained in:
Javi Fontan 2015-11-10 18:32:12 +01:00
parent 7724a1c883
commit c214c6f32a

View File

@ -148,7 +148,7 @@ class OpenNebula::LdapAuth
def is_in_group?(user, group)
result=@ldap.search(
:base => group,
:attributes => @options[:group_field],
:attributes => [@options[:group_field]],
:filter => "(#{@options[:group_field]}=#{user.first})")
if result && result.first