From 45aa49f27d027c4220654d0fcd7b43e3ff8b1c45 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 9 Dec 2022 15:39:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=A7=81=E6=9C=89=E7=BB=84=E7=BB=87=E4=B8=AD=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/queries/projects/list_query.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/queries/projects/list_query.rb b/app/queries/projects/list_query.rb index 0a3cc3a4c..35d91dff8 100644 --- a/app/queries/projects/list_query.rb +++ b/app/queries/projects/list_query.rb @@ -12,6 +12,9 @@ class Projects::ListQuery < ApplicationQuery def call collection = Project.visible + # 增加私有组织中项目过滤 + collection = collection.joins("left join organization_extensions on organization_extensions.organization_id = projects.user_id") + .where("organization_extensions.visibility is null or organization_extensions.visibility in (0,1)") collection = filter_projects(collection) sort = params[:sort_by] || "updated_on"