diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-05-02 14:19:39 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-05-02 14:19:39 +0300 |
commit | d1f5019511a1dc630e97f99bdb1f6b9fe6b02bba (patch) | |
tree | d55c9b5a96640d5a696d2484dde670289f6ed81f /lib/api/session.rb | |
parent | b1ffc9f0fee16251899e5a2efbc78c4781ef4902 (diff) |
Use correct auth finder
Diffstat (limited to 'lib/api/session.rb')
-rw-r--r-- | lib/api/session.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/api/session.rb b/lib/api/session.rb index e308ccc3004..1156aab8cc2 100644 --- a/lib/api/session.rb +++ b/lib/api/session.rb @@ -11,12 +11,7 @@ module API # Example Request: # POST /session post "/session" do - user, _ = Gitlab::Auth.find( - params[:email] || params[:login], - params[:password], - project: nil, - ip: request.ip - ) + user = Gitlab::Auth.find_by_master_or_ldap(params[:email] || params[:login], params[:password]) return unauthorized! unless user present user, with: Entities::UserLogin |