diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-29 21:59:25 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-30 21:02:24 +0300 |
commit | d6b9b21e6db3c32e0f272ab96486876fa8b54d1b (patch) | |
tree | 11392dce46f12f3c0ad236e1a1d143a3b64dceee /app/policies | |
parent | 467b44cbbfd70c627dca0a8f57966bc5ba0999c3 (diff) |
Allow access to the wiki with git when repository feature disabled
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/project_policy.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 1ee31023e26..8ac4bd9df6d 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -50,6 +50,7 @@ class ProjectPolicy < BasePolicy def reporter_access! can! :download_code + can! :download_wiki_code can! :fork_project can! :create_project_snippet can! :update_issue @@ -187,6 +188,7 @@ class ProjectPolicy < BasePolicy unless project.feature_available?(:wiki, user) || project.has_external_wiki? cannot!(*named_abilities(:wiki)) + cannot!(:download_wiki_code) end unless project.feature_available?(:builds, user) && repository_enabled @@ -226,6 +228,7 @@ class ProjectPolicy < BasePolicy can! :read_commit_status can! :read_container_image can! :download_code + can! :download_wiki_code can! :read_cycle_analytics # NOTE: may be overridden by IssuePolicy |