diff options
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r-- | lib/gitlab/git_access.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index b87ca316240..9563fa7cafb 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -79,6 +79,10 @@ module Gitlab check_change_access!(changes) end + def guest_can_downlod_code? + Guest.can?(:download_code, project) + end + def user_can_download_code? authentication_abilities.include?(:download_code) && user_access.can_do_action?(:download_code) end |