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, 3 insertions, 4 deletions
diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb
index a7eaaddd187..7929c36906d 100644
--- a/app/finders/issues_finder.rb
+++ b/app/finders/issues_finder.rb
@@ -20,7 +20,6 @@
# 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
@@ -48,6 +47,8 @@ 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
@@ -75,9 +76,7 @@ class IssuesFinder < IssuableFinder
private
def init_collection
- if params.include_hidden?
- Issue.all
- elsif params.public_only?
+ if params.public_only?
Issue.public_only
else
with_confidentiality_access_check