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-15 11:34:53 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-15 11:34:53 +0300
commit6b381f3fdf00c7eeb971f365bde2a41f0cecf944 (patch)
treeb3e661a6dc8a75149889b4a8aa7b4d7fbdb7369b /lib/gitlab/git_access.rb
parent79e4bb8d0b3b74ddd185677e4828d737788c3b1a (diff)
Use `build_read_container_image` and use `build_download_code`
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 10ef4a1e3cf..63b707db814 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -61,19 +61,19 @@ module Gitlab
end
def user_download_access_check
- unless privileged_user_can_download_code? || restricted_user_can_download_code?
+ unless user_can_download_code? || build_can_download_code?
return build_status_object(false, "You are not allowed to download code from this project.")
end
build_status_object(true)
end
- def privileged_user_can_download_code?
+ def user_can_download_code?
capabilities.include?(:download_code) && user_access.can_do_action?(:download_code)
end
- def restricted_user_can_download_code?
- capabilities.include?(:restricted_download_code) && user_access.can_do_action?(:restricted_download_code)
+ def build_can_download_code?
+ capabilities.include?(:build_download_code) && user_access.can_do_action?(:build_download_code)
end
def user_push_access_check(changes)