Commit 242e77e0 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use early return in lfs_token_check

parent dba227da
......@@ -113,7 +113,8 @@ module Gitlab
User.by_login(login)
end
if actor
return unless actor
token_handler = Gitlab::LfsToken.new(actor)
authentication_abilities =
......@@ -125,7 +126,6 @@ module Gitlab
Result.new(actor, nil, token_handler.type, authentication_abilities) if Devise.secure_compare(token_handler.value, password)
end
end
def build_access_token_check(login, password)
return unless login == 'gitlab-ci-token'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment