retrieving oauth token with LDAP credentials

This commit is contained in:
Valery Sizov 2015-08-27 17:01:11 +03:00
parent abb5b9f6e5
commit 6f785d584b
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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.