From 005687442e460a9ceb9045b3232b8ac13dacc11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxxq250=E2=80=9D?= <“xxq250@qq.com”> Date: Tue, 15 Nov 2022 10:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=90=9C=E7=B4=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/queries/projects/list_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/queries/projects/list_query.rb b/app/queries/projects/list_query.rb index 66f0a43a8..76f235796 100644 --- a/app/queries/projects/list_query.rb +++ b/app/queries/projects/list_query.rb @@ -37,7 +37,7 @@ class Projects::ListQuery < ApplicationQuery ids = Projects::ElasticsearchService.call(params[:search]) items = items.where(platform: 'forge') if ids.present? - items.where(id: ids).by_name_or_identifier(params[:search]).or.where(user_id: User.like(params[:search]).pluck(:id)) + items.where(id: ids).by_name_or_identifier(params[:search]).or(Project.visible.where(user_id: User.like(params[:search]).pluck(:id))) else items.by_name_or_identifier(params[:search]) end