0001-Support-for-group-parameter-with-Active-Directory.patch
src/authm_mad/remotes/ldap/authenticate | ||
---|---|---|
69 | 69 |
ldap=OpenNebula::LdapAuth.new(server_conf) |
70 | 70 | |
71 | 71 |
user_name,user_group_name=ldap.find_user(user) |
72 |
user_group_name=user_name |
|
72 | 73 | |
73 | 74 |
if !user_name |
74 | 75 |
STDERR.puts "User #{user} not found" |
src/authm_mad/remotes/ldap/ldap_auth.rb | ||
---|---|---|
73 | 73 |
end |
74 | 74 | |
75 | 75 |
def is_in_group?(user, group) |
76 |
filter = Net::LDAP::Filter.eq(@options[:group_field], user.first) |
|
76 | 77 |
result=@ldap.search( |
77 | 78 |
:base => group, |
78 |
:filter => "(#{@options[:group_field]}=#{user.first})")
|
|
79 |
:filter => filter)
|
|
79 | 80 | |
80 | 81 |
if result && result.first |
81 | 82 |
true |
82 |
- |