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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-29 17:13:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-29 17:13:29 +0300
commitbb51b8a098aa17b226d1e7941218512f8c835e08 (patch)
treef8765bb77a206b8213b3a777252ce8e2e21642e0 /app/helpers
parent5c4639afa1f53d7ed6f682168fda0b491c16e844 (diff)
Add latest changes from gitlab-org/security/gitlab@15-1-stable-ee
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/timeboxes_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/timeboxes_helper.rb b/app/helpers/timeboxes_helper.rb
index c81fbcbfd11..39993bbfb44 100644
--- a/app/helpers/timeboxes_helper.rb
+++ b/app/helpers/timeboxes_helper.rb
@@ -153,11 +153,11 @@ module TimeboxesHelper
n_("%{releases} release", "%{releases} releases", count) % { releases: count }
end
- def recent_releases_with_counts(milestone)
+ def recent_releases_with_counts(milestone, user)
total_count = milestone.releases.size
return [[], 0, 0] if total_count == 0
- recent_releases = milestone.releases.recent.to_a
+ recent_releases = milestone.releases.recent.filter { |release| Ability.allowed?(user, :read_release, release) }
more_count = total_count - recent_releases.size
[recent_releases, total_count, more_count]
end