diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-02-23 20:47:06 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-03-01 01:15:40 +0300 |
commit | 9f2e4742e354f5548b4956060f1bfa5ee3bd6657 (patch) | |
tree | 45067268ebbcfb48d51c627ef13c2820cad2ad1f /lib/gitlab/auth.rb | |
parent | f0ea7130f7bf0e7a3702d863b4d246f524b6c14a (diff) |
applies relevant changes to the code and code structure
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r-- | lib/gitlab/auth.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index e48462a4bd6..ef261d08b1d 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -105,9 +105,9 @@ module Gitlab def personal_access_token_check(password) return unless password.present? - token = PersonalAccessToken.and_impersonation_tokens.active.find_by_token(password) + token = PersonalAccessToken.with_impersonation_tokens.active.find_by_token(password) - if token && (valid_api_token?(token) || token.impersonation) + if token && valid_api_token?(token) Gitlab::Auth::Result.new(token.user, nil, :personal_token, full_authentication_abilities) end end |