From c508ae015b01e7ce814e7593cd3563cf6776aa14 Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Wed, 31 Aug 2022 10:37:44 +0200 Subject: [PATCH] B #5946: Compare group_admin groups case-insens. (#2269) (cherry picked from commit 57e738c424e79b1d35bbe2c38c432d0307ffbb98) --- src/authm_mad/remotes/ldap/ldap_auth.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/authm_mad/remotes/ldap/ldap_auth.rb b/src/authm_mad/remotes/ldap/ldap_auth.rb index cab8217884..04a08020e7 100644 --- a/src/authm_mad/remotes/ldap/ldap_auth.rb +++ b/src/authm_mad/remotes/ldap/ldap_auth.rb @@ -213,7 +213,9 @@ class OpenNebula::LdapAuth groups = [] ldap_groups.each do |group| if (g = in_hash_ignore_case?(@mapping, group)) - if ldap_groups.include? @options[:group_admin_group_dn] + if ldap_groups.any? { + |s| s.casecmp(@options[:group_admin_group_dn])==0 + } groups << "*#{@mapping[g]}" else groups << @mapping[g]