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:
Diffstat (limited to 'app/finders/issues_finder.rb')
-rw-r--r--app/finders/issues_finder.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb
index 7595b1c7a15..abf0c180d6b 100644
--- a/app/finders/issues_finder.rb
+++ b/app/finders/issues_finder.rb
@@ -20,6 +20,7 @@
# sort: string
# my_reaction_emoji: string
# public_only: boolean
+# include_hidden: boolean
# due_date: date or '0', '', 'overdue', 'week', or 'month'
# created_after: datetime
# created_before: datetime
@@ -47,8 +48,6 @@ class IssuesFinder < IssuableFinder
# rubocop: disable CodeReuse/ActiveRecord
def with_confidentiality_access_check
- return Issue.all if params.user_can_see_all_issues?
-
# Only admins can see hidden issues, so for non-admins, we filter out any hidden issues
issues = Issue.without_hidden
@@ -76,7 +75,9 @@ class IssuesFinder < IssuableFinder
private
def init_collection
- if params.public_only?
+ if params.include_hidden?
+ Issue.all
+ elsif params.public_only?
Issue.public_only
else
with_confidentiality_access_check