diff options
Diffstat (limited to 'app/finders/issues_finder.rb')
-rw-r--r-- | app/finders/issues_finder.rb | 7 |
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 |