mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
fix
This commit is contained in:
@@ -408,7 +408,7 @@ class UsersController < ApplicationController
|
||||
|
||||
def projects
|
||||
is_current_admin_user = User.current.logged? && (current_user&.admin? || current_user.id == @user.id)
|
||||
scope = Projects::ListMyQuery.call(params, @user,is_current_admin_user)
|
||||
scope, @home_top_ids = Projects::ListMyQuery.call(params, @user,is_current_admin_user)
|
||||
@total_count = scope.size
|
||||
@projects = kaminari_unlimit_paginate(scope)
|
||||
end
|
||||
|
||||
@@ -83,5 +83,7 @@ class Projects::ListMyQuery < ApplicationQuery
|
||||
scope.distinct.order("projects.#{sort} #{sort_direction}")
|
||||
end
|
||||
end
|
||||
|
||||
return scope, @home_top_ids
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user