Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-04-20 10:43:28 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-04-20 10:43:28 +0300
commit225b43de22a20cd371f655d5836eb1b2cf1c259e (patch)
tree7743a3fd1b4eb046e39f995fa04a44af8e0efc0e /config
parent41b45ece99ab7ec2069a0ae87776140d2b42307f (diff)
parent307e7ffdba9065a72f225b9429c09ea374cec572 (diff)
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Diffstat (limited to 'config')
-rw-r--r--config/initializers/doorkeeper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index 9da7ebf4290..d422acb31d6 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -11,7 +11,7 @@ Doorkeeper.configure do
end
resource_owner_from_credentials do |routes|
- u = User.find_by(email: params[:username])
+ u = User.find_by(email: params[:username]) || User.find_by(username: params[:username])
u if u && u.valid_password?(params[:password])
end
@@ -83,7 +83,7 @@ Doorkeeper.configure do
#
# If not specified, Doorkeeper enables all the four grant flows.
#
- # grant_flows %w(authorization_code implicit password client_credentials)
+ grant_flows %w(authorization_code password client_credentials)
# Under some circumstances you might want to have applications auto-approved,
# so that the user skips the authorization step.