diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-08-18 01:39:20 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-08-19 00:47:26 +0300 |
commit | a4137411c62d093a55dc171665dc90325182bb04 (patch) | |
tree | 3000d1645362d274eab02b1bd46cb6b4f3e063c1 /config | |
parent | c29780086201b331091be3ba5df0653381cf0c2c (diff) |
Small refactor and syntax fixes.
Diffstat (limited to 'config')
-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. |