Commit 85152f02 authored by Patricio Cano's avatar Patricio Cano

Improve string handling.

parent c25630ee
...@@ -118,8 +118,8 @@ module Gitlab ...@@ -118,8 +118,8 @@ module Gitlab
def lfs_token_check(login, password) def lfs_token_check(login, password)
actor = actor =
if login.include?('lfs-deploy-key') if login.start_with?('lfs-deploy-key')
DeployKey.find(login.gsub('lfs-deploy-key-', '')) DeployKey.find(login.sub('lfs-deploy-key-', ''))
else else
User.by_login(login) User.by_login(login)
end end
......
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