Commit 46d7c1d2 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Prefer guest_can_download_code? and fix typo

parent 1b150576
...@@ -51,7 +51,7 @@ module Gitlab ...@@ -51,7 +51,7 @@ module Gitlab
deploy_key.has_access_to?(project) deploy_key.has_access_to?(project)
elsif user elsif user
user_can_download_code? || build_can_download_code? user_can_download_code? || build_can_download_code?
end || guest_can_downlod_code? end || guest_can_download_code?
unless passed unless passed
message = if deploy_key message = if deploy_key
...@@ -79,7 +79,7 @@ module Gitlab ...@@ -79,7 +79,7 @@ module Gitlab
check_change_access!(changes) check_change_access!(changes)
end end
def guest_can_downlod_code? def guest_can_download_code?
Guest.can?(:download_code, project) Guest.can?(:download_code, project)
end end
......
module Gitlab module Gitlab
class GitAccessWiki < GitAccess class GitAccessWiki < GitAccess
def guest_can_downlod_code? def guest_can_download_code?
Guest.can?(:download_wiki_code, project) Guest.can?(:download_wiki_code, project)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment