diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-03-28 16:54:38 +0400 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-03-28 16:57:52 +0400 |
commit | 2e6b537018062b8407411e7bd51327f797f2fe1f (patch) | |
tree | 6a649ced45abaeed4e4bdee6fd66663bda786d21 | |
parent | 4af38885dfee57fee5e7a61ed59987a5454d5714 (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.
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | lib/gitlab/ldap/user.rb | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG index 06d19df7a32..0224d950283 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ v 6.8.0 - Ability to at mention users that are participating in issue and merge req. discussion - Enabled GZip Compression for assets in example Nginx, make sure that Nginx is compiled with --with-http_gzip_static_module flag (this is default in Ubuntu) - Make user search case-insensitive (Christopher Arnold) + - Remove omniauth-ldap nickname bug workaround v 6.7.2 - Fix upgrader script 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 |