Skip to content
Snippets Groups Projects
Commit 5790684d authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Support pushing via SSH

parent b51ededc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -130,7 +130,14 @@ module Gitlab
if actor
token_handler = Gitlab::LfsToken.new(actor)
 
Result.new(actor, nil, token_handler.type, read_authentication_abilities) if Devise.secure_compare(token_handler.value, password)
authentication_abilities =
if token_handler.user?
full_authentication_abilities
else
read_authentication_abilities
end
Result.new(actor, nil, token_handler.type, authentication_abilities) if Devise.secure_compare(token_handler.value, password)
end
end
 
Loading
Loading
Loading
Loading
@@ -33,6 +33,10 @@ module Gitlab
end
end
 
def user?
actor.is_a?(User)
end
def type
actor.is_a?(User) ? :lfs_token : :lfs_deploy_token
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment