Skip to content

Commit

Permalink
CV2-3738: remove privacy condition from search
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy committed Sep 20, 2023
1 parent 92f312c commit 009edb6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/check_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 009edb6

Please sign in to comment.