项目列表增加私有组织中项目过滤

This commit is contained in:
xxq250 2022-12-09 15:42:47 +08:00
parent 45aa49f27d
commit 69065d1e5a
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class Projects::ListQuery < ApplicationQuery
# 增加私有组织中项目过滤
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)")
.where("projects.user_id > 0")
collection = filter_projects(collection)
sort = params[:sort_by] || "updated_on"