Browse Source

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

pull/313/head
xxq250 3 years ago
parent
commit
45aa49f27d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      app/queries/projects/list_query.rb

+ 3
- 0
app/queries/projects/list_query.rb View File

@@ -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"


Loading…
Cancel
Save