diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-06-14 05:39:11 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-14 05:39:11 +0300 |
commit | b6a703e71546acc482ba58e1bba48f0eb747653c (patch) | |
tree | 6439646525539562cd63adb9d6bf4e436ef10afb /lib/gitlab/auth.rb | |
parent | f7467bd6b4f7f577002d8f14b41d3382d8d93d54 (diff) | |
parent | f34af6b83cc2663bb8a076f4df9c82047e5511ab (diff) |
Merge branch 'master' into 8-9-stable
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r-- | lib/gitlab/auth.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 076e2af7d38..db1704af75e 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -3,14 +3,14 @@ module Gitlab Result = Struct.new(:user, :type) class << self - def find(login, password, project:, ip:) + def find_for_git_client(login, password, project:, ip:) raise "Must provide an IP for rate limiting" if ip.nil? result = Result.new if valid_ci_request?(login, password, project) result.type = :ci - elsif result.user = find_in_gitlab_or_ldap(login, password) + elsif result.user = find_with_user_password(login, password) result.type = :gitlab_or_ldap elsif result.user = oauth_access_token_check(login, password) result.type = :oauth @@ -20,7 +20,7 @@ module Gitlab result end - def find_in_gitlab_or_ldap(login, password) + def find_with_user_password(login, password) user = User.by_login(login) # If no user is found, or it's an LDAP server, try LDAP. |