mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 10:36:04 +10:00
Merge branch 'LDAPUsernameUID' of /mnt/ebs/repositories/subscribers/gitlab-ee
This commit is contained in:
@@ -13,8 +13,8 @@ module Gitlab
|
||||
def find_or_create(auth)
|
||||
@auth = auth
|
||||
|
||||
if uid.blank? || email.blank?
|
||||
raise_error("Account must provide an uid and email address")
|
||||
if uid.blank? || email.blank? || username.blank?
|
||||
raise_error("Account must provide a dn, uid and email address")
|
||||
end
|
||||
|
||||
user = find(auth)
|
||||
@@ -64,6 +64,10 @@ module Gitlab
|
||||
model.where(provider: provider, extern_uid: uid).last
|
||||
end
|
||||
|
||||
def username
|
||||
auth.info.nickname.to_s.force_encoding("utf-8")
|
||||
end
|
||||
|
||||
def provider
|
||||
'ldap'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user