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 'lib/gitlab/git_access_snippet.rb')
-rw-r--r--lib/gitlab/git_access_snippet.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/gitlab/git_access_snippet.rb b/lib/gitlab/git_access_snippet.rb
index 5ae17dbbb91..8c291dd56ba 100644
--- a/lib/gitlab/git_access_snippet.rb
+++ b/lib/gitlab/git_access_snippet.rb
@@ -90,13 +90,14 @@ module Gitlab
super
end
- override :check_download_access!
- def check_download_access!
- passed = guest_can_download_code? || user_can_download_code?
+ override :can_download?
+ def can_download?
+ guest_can_download? || user_can_download?
+ end
- unless passed
- raise ForbiddenError, error_message(:read_snippet)
- end
+ override :download_forbidden_message
+ def download_forbidden_message
+ error_message(:read_snippet)
end
override :check_change_access!