mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-03 13:47:01 +03:00
Signed-off-by: Steven Armstrong <steven.armstrong@id.ethz.ch>
This commit is contained in:
parent
26ed3d5570
commit
339a87475d
@ -39,6 +39,7 @@ class OpenNebula::LdapAuth
|
||||
:user => nil,
|
||||
:password => nil,
|
||||
:base => nil,
|
||||
:group_base => nil,
|
||||
:auth_method => :simple,
|
||||
:user_field => 'cn',
|
||||
:user_group_field => 'dn',
|
||||
@ -198,9 +199,10 @@ class OpenNebula::LdapAuth
|
||||
end
|
||||
end
|
||||
else
|
||||
group_base = @options[:group_base] ? @options[:group_base] : @options[:base]
|
||||
filter = Net::LDAP::Filter.equals(@options[:group_field], @user[@options[:user_group_field]].first)
|
||||
@ldap.search(
|
||||
:base => @options[:base],
|
||||
:base => group_base,
|
||||
:attributes => [ "dn" ],
|
||||
:filter => filter
|
||||
) do |entry|
|
||||
|
Loading…
x
Reference in New Issue
Block a user