mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-09 09:57:23 +03:00
B #-: Fix ldap_auth if group_admin_group_dn is nil (#2403)
As in ruby 2.0 irb(main):001:0> 'a'.casecmp(nil) TypeError: no implicit conversion of nil into String
This commit is contained in:
parent
0b7d36df7f
commit
3355250205
@ -213,7 +213,7 @@ class OpenNebula::LdapAuth
|
||||
groups = []
|
||||
ldap_groups.each do |group|
|
||||
if (g = in_hash_ignore_case?(@mapping, group))
|
||||
if ldap_groups.any? {
|
||||
if !@options[:group_admin_group_dn].nil? and ldap_groups.any? {
|
||||
|s| s.casecmp(@options[:group_admin_group_dn])==0
|
||||
}
|
||||
groups << "*#{@mapping[g]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user