Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-03-26 19:20:32 +0300
committerNick Thomas <nick@gitlab.com>2019-03-26 19:20:32 +0300
commit8947103ff62f96708ff08eea48cbb6a8a249e398 (patch)
treeea2a4866c4efd2159cda887c13228b3076836b53 /lib
parent6ac86054edb96e6ad0fee55452df21d133042db8 (diff)
parentac64e450114c403117869128eb88698900b7bf46 (diff)
Merge branch 'fix-hidden-statistics' into 'master'
Show statistics also when repository is disabled Closes #59390 See merge request gitlab-org/gitlab-ce!26509
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