diff options
author | Peter Marko <peter.marko@siemens.com> | 2019-03-23 00:44:35 +0100 |
---|---|---|
committer | Peter Marko <peter.marko@siemens.com> | 2019-03-23 12:06:50 +0100 |
commit | 12adb2a4bcca8b8ea07be2b9d120404e8a14a4be (patch) | |
tree | 615c38d321a86770930958c60c0b67592b8622e6 /lib | |
parent | 09d25b04c34398f9f825b3cc95265af3097fa035 (diff) | |
download | gitlab-ce-12adb2a4bcca8b8ea07be2b9d120404e8a14a4be.tar.gz |
Show statistics also when repository is disabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 2 |
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 |