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:
authorHoratiu Eugen Vlad <horatiu@vlad.eu>2018-03-26 12:23:54 +0300
committerHoratiu Eugen Vlad <horatiu@vlad.eu>2018-03-27 10:21:17 +0300
commit7d01792614e48c8f94307d660298014cd01cb79c (patch)
treec5981e90b915ee09871a6505193f4c9fc5ab65dd /lib/gitlab/auth.rb
parent391732a2c1b04baf565c77f2788a1ec035b1d85e (diff)
Fix LDAP login without user in DB
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r--lib/gitlab/auth.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index f5ccf952cf9..6af763faf10 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -69,7 +69,11 @@ module Gitlab
authenticators.compact!
- user if authenticators.find { |auth| auth.login(login, password) }
+ # return found user that was authenticated first for given login credentials
+ authenticators.find do |auth|
+ authenticated_user = auth.login(login, password)
+ break authenticated_user if authenticated_user
+ end
end
end