Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-03-28 16:54:38 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-03-28 16:57:52 +0400
commit2e6b537018062b8407411e7bd51327f797f2fe1f (patch)
tree6a649ced45abaeed4e4bdee6fd66663bda786d21 /lib/gitlab
parent4af38885dfee57fee5e7a61ed59987a5454d5714 (diff)
Use omniauth nickname as the username for LDAP
Before there was a bug in omniauth-ldap which prevented samaccountname showing up as a possible username for new LDAP users. Thanks to upstream fixes, we no longer need to work around this bug.
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/ldap/user.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb
index 456a61b9e43..6bc587df3ce 100644
--- a/lib/gitlab/ldap/user.rb
+++ b/lib/gitlab/ldap/user.rb
@@ -86,11 +86,7 @@ module Gitlab
end
def username
- (auth.info.nickname || samaccountname).to_s.force_encoding("utf-8")
- end
-
- def samaccountname
- (auth.extra[:raw_info][:samaccountname] || []).first
+ auth.info.nickname.to_s.force_encoding("utf-8")
end
def provider