summaryrefslogtreecommitdiff
path: root/lib/gitlab/ldap/auth_hash.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-09-23 16:37:59 +0200
committerDouwe Maan <douwe@gitlab.com>2015-09-23 16:37:59 +0200
commit73a3df4de351528dfe954c0f44af1f0e45b221d0 (patch)
treea1a22bfcb5613d44227a19edc7b31ab7bdfc22a9 /lib/gitlab/ldap/auth_hash.rb
parentcfe663407844f55565e8b7e101f05fc24315e2ff (diff)
downloadgitlab-ce-73a3df4de351528dfe954c0f44af1f0e45b221d0.tar.gz
Fix LDAP attribute mappingfix-ldap-attributes
Diffstat (limited to 'lib/gitlab/ldap/auth_hash.rb')
-rw-r--r--lib/gitlab/ldap/auth_hash.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/auth_hash.rb b/lib/gitlab/ldap/auth_hash.rb
index 55deeeacd90..bf4dd9542d5 100644
--- a/lib/gitlab/ldap/auth_hash.rb
+++ b/lib/gitlab/ldap/auth_hash.rb
@@ -6,7 +6,7 @@ module Gitlab
private
def get_info(key)
- attributes = ldap_config.attributes[key]
+ attributes = ldap_config.attributes[key.to_s]
return super unless attributes
attributes = Array(attributes)
@@ -14,6 +14,7 @@ module Gitlab
value = nil
attributes.each do |attribute|
value = get_raw(attribute)
+ value = value.first if value
break if value.present?
end