diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-15 21:16:38 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-15 21:16:38 +0200 |
commit | 83b643a0145cf3f5b919cc61342ba0a824dfdcc9 (patch) | |
tree | 41bf105a1b8d28b8385bfbccc033df544b7ebdfe /lib/api/internal.rb | |
parent | eed5c58d8542cef8cc4012a303c9bb963b7f5f20 (diff) | |
parent | be09bcf074e6048aa9ba5f8dfb99754e6afbe156 (diff) | |
download | gitlab-ce-83b643a0145cf3f5b919cc61342ba0a824dfdcc9.tar.gz |
Merge remote-tracking branch 'origin/lfs-support-for-ssh' into per-build-token
# Conflicts:
# app/controllers/projects/git_http_client_controller.rb
# app/helpers/lfs_helper.rb
# lib/gitlab/auth.rb
# spec/requests/lfs_http_spec.rb
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 2610fd329d6..865379c51c4 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -82,6 +82,19 @@ module API response end + post "/lfs_authenticate" do + status 200 + + key = Key.find(params[:key_id]) + token_handler = Gitlab::LfsToken.new(key) + + { + username: token_handler.actor_name, + lfs_token: token_handler.generate, + repository_http_path: project.http_url_to_repo + } + end + get "/merge_request_urls" do ::MergeRequests::GetUrlsService.new(project).execute(params[:changes]) end |