Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-19 17:34:32 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-19 17:34:32 +0300
commit3c1bb3432b0b8448262ec9a9a3468641c82db5c1 (patch)
tree0ee07fcff0db3ef3beb744d124efe80aa15373c8 /app/controllers/projects/git_http_client_controller.rb
parent135be3cabb01ca3c825829f18ede4e8720383d7b (diff)
Revert "Revert all changes introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043"
This reverts commit 6d43c95b7011ec7ec4600e00bdc8df76bb39813c.
Diffstat (limited to 'app/controllers/projects/git_http_client_controller.rb')
-rw-r--r--app/controllers/projects/git_http_client_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/projects/git_http_client_controller.rb b/app/controllers/projects/git_http_client_controller.rb
index d1a2c52d80a..ee9ea4bc8b2 100644
--- a/app/controllers/projects/git_http_client_controller.rb
+++ b/app/controllers/projects/git_http_client_controller.rb
@@ -132,6 +132,12 @@ class Projects::GitHttpClientController < Projects::ApplicationController
authentication_project == project
end
+ def lfs_deploy_key?
+ authentication_result.lfs_deploy_token? &&
+ actor &&
+ actor.projects.include?(project)
+ end
+
def authentication_has_download_access?
has_authentication_ability?(:download_code) || has_authentication_ability?(:build_download_code)
end