diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /lib/gitlab/git_access_snippet.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'lib/gitlab/git_access_snippet.rb')
-rw-r--r-- | lib/gitlab/git_access_snippet.rb | 13 |
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! |