mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
移除匿名用户的项目
This commit is contained in:
@@ -17,10 +17,11 @@ class Projects::ListQuery < ApplicationQuery
|
||||
# else
|
||||
# projects = Project.visible
|
||||
# end
|
||||
projects = Project.where("user_id != ?", 2) #匿名用户的项目
|
||||
if params[:user_id].to_i != 2 && params[:user_id].to_i != 0
|
||||
projects = Project.list_user_projects(params[:user_id])
|
||||
projects = projects.list_user_projects(params[:user_id])
|
||||
else
|
||||
projects = Project.visible
|
||||
projects = projects.visible
|
||||
end
|
||||
scope = projects.includes(:project_category, :project_language, :repository, owner: :user_extension).like(params[:search])
|
||||
.with_project_type(params[:project_type])
|
||||
|
||||
Reference in New Issue
Block a user