Support pushing via SSH
This commit is contained in:
parent
b51ededc5f
commit
5790684d1f
2 changed files with 12 additions and 1 deletions
|
@ -130,7 +130,14 @@ module Gitlab
|
||||||
if actor
|
if actor
|
||||||
token_handler = Gitlab::LfsToken.new(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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,10 @@ module Gitlab
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def user?
|
||||||
|
actor.is_a?(User)
|
||||||
|
end
|
||||||
|
|
||||||
def type
|
def type
|
||||||
actor.is_a?(User) ? :lfs_token : :lfs_deploy_token
|
actor.is_a?(User) ? :lfs_token : :lfs_deploy_token
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue