Commit 20106834 authored by Drew Blessing's avatar Drew Blessing

Merge branch 'fixKerberosSignUp' into 'master'

Fix signup using kerberos

kerberos only provides a username and an email, but no name. Therefore a signup fails because the name is empty. Best guess for the name is probably the username, therefore use it as name.

I also created an issue for this: #5945

See merge request !2336
parents 4bc7d6e3 2444c040
...@@ -17,6 +17,7 @@ v 8.4.0 (unreleased) ...@@ -17,6 +17,7 @@ v 8.4.0 (unreleased)
- Expire view caches when application settings change (e.g. Gravatar disabled) (Stan Hu) - Expire view caches when application settings change (e.g. Gravatar disabled) (Stan Hu)
- Don't notify users twice if they are both project watchers and subscribers (Stan Hu) - Don't notify users twice if they are both project watchers and subscribers (Stan Hu)
- Remove gray background from layout in UI - Remove gray background from layout in UI
- Fix signup for OAuth providers that don't provide a name
- Implement new UI for group page - Implement new UI for group page
- Implement search inside emoji picker - Implement search inside emoji picker
- Add API support for looking up a user by username (Stan Hu) - Add API support for looking up a user by username (Stan Hu)
......
...@@ -142,8 +142,11 @@ module Gitlab ...@@ -142,8 +142,11 @@ module Gitlab
email = auth_hash.email email = auth_hash.email
end end
name = auth_hash.name
name = ::Namespace.clean_path(username) if name.strip.empty?
{ {
name: auth_hash.name, name: name,
username: ::Namespace.clean_path(username), username: ::Namespace.clean_path(username),
email: email, email: email,
password: auth_hash.password, password: auth_hash.password,
......
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