summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2019-03-23 00:44:35 +0100
committerPeter Marko <peter.marko@siemens.com>2019-03-23 12:06:50 +0100
commit12adb2a4bcca8b8ea07be2b9d120404e8a14a4be (patch)
tree615c38d321a86770930958c60c0b67592b8622e6 /lib
parent09d25b04c34398f9f825b3cc95265af3097fa035 (diff)
downloadgitlab-ce-12adb2a4bcca8b8ea07be2b9d120404e8a14a4be.tar.gz
Show statistics also when repository is disabled
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 611523a2444..6fd267ff2ed 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -275,7 +275,7 @@ module API
expose :printing_merge_request_link_enabled
expose :merge_method
expose :statistics, using: 'API::Entities::ProjectStatistics', if: -> (project, options) {
- options[:statistics] && Ability.allowed?(options[:current_user], :download_code, project)
+ options[:statistics] && Ability.allowed?(options[:current_user], :read_statistics, project)
}
# rubocop: disable CodeReuse/ActiveRecord