diff options
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issues_finder.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb index a0504ca0879..d0a094ea4a6 100644 --- a/app/finders/issues_finder.rb +++ b/app/finders/issues_finder.rb @@ -69,9 +69,22 @@ class IssuesFinder < IssuableFinder end def filter_items(items) - by_due_date(super) + issues = by_due_date(super) + by_confidential(issues) end + # rubocop: disable CodeReuse/ActiveRecord + def by_confidential(items) + if params[:confidential] == 'yes' + items.where('issues.confidential = TRUE') + elsif params[:confidential] == 'no' + items.where.not('issues.confidential = TRUE') + else + items + end + end + # rubocop: enable CodeReuse/ActiveRecord + def by_due_date(items) if due_date? if filter_by_no_due_date? |