diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-08-17 17:39:20 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-08-18 16:47:26 -0500 |
commit | a4137411c62d093a55dc171665dc90325182bb04 (patch) | |
tree | 3000d1645362d274eab02b1bd46cb6b4f3e063c1 /config/initializers | |
parent | c29780086201b331091be3ba5df0653381cf0c2c (diff) | |
download | gitlab-ce-a4137411c62d093a55dc171665dc90325182bb04.tar.gz |
Small refactor and syntax fixes.2fa-api-check
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/doorkeeper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 6d08714dcf7..fc4b0a72add 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -13,7 +13,7 @@ Doorkeeper.configure do resource_owner_from_credentials do |routes| user = Gitlab::Auth.find_with_user_password(params[:username], params[:password]) - user unless user && user.two_factor_enabled? + 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. |