项目搜索增加用户信息搜索

This commit is contained in:
“xxq250” 2022-11-15 10:27:19 +08:00
parent d4762d2900
commit 005687442e
1 changed files with 1 additions and 1 deletions

View File

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