summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-08 14:03:27 +0000
committerRémy Coutable <remy@rymai.me>2016-06-08 14:03:27 +0000
commit07b32287e51e621d8510f0b8e7103ed47c3b4636 (patch)
treea4ea8e547eccecceeb77c6124aa13689dacd6f89 /lib/api
parent99ea32714bb307421ff81ad17983c1b0dce0eac4 (diff)
parentdf62cbd917f85f85d2e3371da2eccf724d5d94e0 (diff)
downloadgitlab-ce-07b32287e51e621d8510f0b8e7103ed47c3b4636.tar.gz
Merge branch 'git-http-controller' into 'master'
Dismantling Grack::Auth part 1: Git HTTP clients Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/14501 This does not completely get rid of Grack::Auth yet because Git LFS support is 'behind' it and I would like to not make this MR bigger than needed. - changed tests to make HTTP requests instead of calling Rack apps - added missing test cases for Git HTTP authentication - moved Git HTTP requests into a 'normal' Rails controller See merge request !3361
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/session.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/api/session.rb b/lib/api/session.rb
index cc646895914..56e69b2366f 100644
--- a/lib/api/session.rb
+++ b/lib/api/session.rb
@@ -11,8 +11,7 @@ module API
# Example Request:
# POST /session
post "/session" do
- auth = Gitlab::Auth.new
- user = auth.find(params[:email] || params[:login], params[:password])
+ user = Gitlab::Auth.find_in_gitlab_or_ldap(params[:email] || params[:login], params[:password])
return unauthorized! unless user
present user, with: Entities::UserLogin