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:
Diffstat (limited to 'app/controllers/concerns/lfs_request.rb')
-rw-r--r--app/controllers/concerns/lfs_request.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/controllers/concerns/lfs_request.rb b/app/controllers/concerns/lfs_request.rb
index 1653b40bad5..1c4521e2353 100644
--- a/app/controllers/concerns/lfs_request.rb
+++ b/app/controllers/concerns/lfs_request.rb
@@ -80,7 +80,7 @@ module LfsRequest
def lfs_download_access?
ci? || lfs_deploy_token? || user_can_download_code? || build_can_download_code? || deploy_token_can_download_code?
end
- strong_memoize_attr :lfs_download_access?, :lfs_download_access
+ strong_memoize_attr :lfs_download_access?
def deploy_token_can_download_code?
deploy_token.present? &&
@@ -92,10 +92,12 @@ module LfsRequest
return false unless has_authentication_ability?(:push_code)
return false if limit_exceeded?
- lfs_deploy_token? || can?(user, :push_code,
-project) || can?(deploy_token, :push_code, project) || any_branch_allows_collaboration?
+ lfs_deploy_token? ||
+ can?(user, :push_code, project) ||
+ can?(deploy_token, :push_code, project) ||
+ any_branch_allows_collaboration?
end
- strong_memoize_attr :lfs_upload_access?, :lfs_upload_access
+ strong_memoize_attr :lfs_upload_access?
def any_branch_allows_collaboration?
project.merge_requests_allowing_push_to_user(user).any?