Commit 2e6b5370 authored by Jacob Vosmaer's avatar Jacob Vosmaer

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.
parent 4af38885
...@@ -2,6 +2,7 @@ v 6.8.0 ...@@ -2,6 +2,7 @@ v 6.8.0
- Ability to at mention users that are participating in issue and merge req. discussion - 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) - 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) - Make user search case-insensitive (Christopher Arnold)
- Remove omniauth-ldap nickname bug workaround
v 6.7.2 v 6.7.2
- Fix upgrader script - Fix upgrader script
......
...@@ -86,11 +86,7 @@ module Gitlab ...@@ -86,11 +86,7 @@ module Gitlab
end end
def username def username
(auth.info.nickname || samaccountname).to_s.force_encoding("utf-8") auth.info.nickname.to_s.force_encoding("utf-8")
end
def samaccountname
(auth.extra[:raw_info][:samaccountname] || []).first
end end
def provider def provider
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment