diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-08-27 17:01:11 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-08-31 15:10:01 +0300 |
commit | 6f785d584b2607ccd6997933364434e7d9a27504 (patch) | |
tree | 805686987d06de3a9dc6a862a5dff725b76ccdd6 | |
parent | abb5b9f6e526195c4eb027d5b7c28e070d9ac3c1 (diff) | |
download | gitlab-ce-oauth_token_with_ldap.tar.gz |
retrieving oauth token with LDAP credentialsoauth_token_with_ldap
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/initializers/doorkeeper.rb | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index 386ce7ca6d4..4b3cc639a11 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ v 8.0.0 (unreleased) - Fix 500 error when submit project snippet without body - Improve search page usability - Bring more UI consistency in way how projects, snippets and groups lists are rendered + - Retrieving oauth token with LDAP credentials v 7.14.1 - Improve abuse reports management from admin area diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 6139ddbe6cd..66ac88e9f4a 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -12,8 +12,7 @@ Doorkeeper.configure do end resource_owner_from_credentials do |routes| - u = User.find_by(email: params[:username]) || User.find_by(username: params[:username]) - u if u && u.valid_password?(params[:password]) + Gitlab::Auth.new.find(params[:username], params[:password]) end # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below. |