summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-06-10 14:51:16 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-06-10 14:51:16 +0200
commit0e896ffe4eebb8bcf04bc1327d498bb041faed56 (patch)
tree78a0e64cba51421b5164c7479099a9b2a0c13790 /app
parentcfc99bbd1390bc548a703fdc7857c7db5b0e7c13 (diff)
downloadgitlab-ce-0e896ffe4eebb8bcf04bc1327d498bb041faed56.tar.gz
Improve Gitlab::Auth method names
Auth.find was a very generic name for a very specific method. Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also looks in Kerberos.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/jwt_controller.rb2
-rw-r--r--app/controllers/projects/git_http_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/jwt_controller.rb b/app/controllers/jwt_controller.rb
index 131a16dad9b..014b9b43ff2 100644
--- a/app/controllers/jwt_controller.rb
+++ b/app/controllers/jwt_controller.rb
@@ -42,7 +42,7 @@ class JwtController < ApplicationController
end
def authenticate_user(login, password)
- user = Gitlab::Auth.find_in_gitlab_or_ldap(login, password)
+ user = Gitlab::Auth.find_with_user_password(login, password)
Gitlab::Auth.rate_limit!(request.ip, success: user.present?, login: login)
user
end
diff --git a/app/controllers/projects/git_http_controller.rb b/app/controllers/projects/git_http_controller.rb
index 348d6cf4d96..f907d63258b 100644
--- a/app/controllers/projects/git_http_controller.rb
+++ b/app/controllers/projects/git_http_controller.rb
@@ -43,7 +43,7 @@ class Projects::GitHttpController < Projects::ApplicationController
return if project && project.public? && upload_pack?
authenticate_or_request_with_http_basic do |login, password|
- auth_result = Gitlab::Auth.find(login, password, project: project, ip: request.ip)
+ auth_result = Gitlab::Auth.find_for_git_client(login, password, project: project, ip: request.ip)
if auth_result.type == :ci && upload_pack?
@ci = true