From 009edb686ebd592c192c1fea4b5ad0072012aaa5 Mon Sep 17 00:00:00 2001 From: Sawy Date: Wed, 20 Sep 2023 16:55:01 +0300 Subject: [PATCH] CV2-3738: remove privacy condition from search --- lib/check_search.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/check_search.rb b/lib/check_search.rb index eefe0d25fd..a3e53119f1 100644 --- a/lib/check_search.rb +++ b/lib/check_search.rb @@ -351,11 +351,6 @@ def adjust_project_filter # Invalidate the search if empty... otherwise, adjust the projects filter @options['projects'] = project_ids.empty? ? [0] : project_ids end - # Also, adjust projects filter taking projects' privacy settings into account - if Team.current && !feed_query? && [@options['team_id']].flatten.size == 1 - t = Team.find([@options['team_id']].flatten.first) - @options['projects'] = @options['projects'].blank? ? (Project.where(team_id: t.id).allowed(t).map(&:id) + [nil]) : Project.where(id: @options['projects']).allowed(t).map(&:id) - end @options['projects'] += [nil] if @options['none_project'] end