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
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2019-07-02 09:19:58 +0300
committerMarin Jankovski <marin@gitlab.com>2019-07-02 09:19:58 +0300
commitf66169b35c29294ecc9f63eeeedc52085d2a3fd7 (patch)
tree272bcdb2ffd338d82b615e075e721a9043bc323a /app/models/concerns
parentf4cc3db38be9583876e0dffdbeb0f759e4945f5f (diff)
parent09163e423ac50c8eda82f67e5419142893faf18a (diff)
Merge branch 'security-59581-related-merge-requests-count' into 'master'
Expose merge requests count based on user access See merge request gitlab/gitlabhq!3157
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/issuable.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 127430cc68f..299e413321d 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -29,7 +29,11 @@ module Issuable
# This object is used to gather issuable meta data for displaying
# upvotes, downvotes, notes and closing merge requests count for issues and merge requests
# lists avoiding n+1 queries and improving performance.
- IssuableMeta = Struct.new(:upvotes, :downvotes, :user_notes_count, :merge_requests_count)
+ IssuableMeta = Struct.new(:upvotes, :downvotes, :user_notes_count, :mrs_count) do
+ def merge_requests_count(user = nil)
+ mrs_count
+ end
+ end
included do
cache_markdown_field :title, pipeline: :single_line