diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-18 19:04:31 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-18 19:04:31 -0500 |
commit | 41529b925437b20206d00ea0e1fd82b144b8e513 (patch) | |
tree | 154bd420d5fdc6fd4c60d6155f3081e3a419e850 /config | |
parent | 1f3a0d52a36fda712ff07bc0ad71d44146c1953b (diff) | |
parent | c5aa31c83145366d88ce6d8d91e68467cf5baed4 (diff) | |
download | gitlab-ce-41529b925437b20206d00ea0e1fd82b144b8e513.tar.gz |
Merge branch 'master' into expiration-date-on-memberships
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/doorkeeper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 618dba74151..fc4b0a72add 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -12,7 +12,8 @@ Doorkeeper.configure do end resource_owner_from_credentials do |routes| - Gitlab::Auth.find_with_user_password(params[:username], params[:password]) + user = Gitlab::Auth.find_with_user_password(params[:username], params[:password]) + user unless user.try(:two_factor_enabled?) end # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below. |