Merge branch 'standalone_develop' into trustie_server

This commit is contained in:
xxq250 2024-08-29 16:21:18 +08:00
commit f80a33c9df
1 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class Users::ProjectService
projects = category_filter(projects)
projects = status_filter(projects)
projects = by_project_topic(projects)
custom_sort(projects, params[:sort_by], params[:sort_direction])
end
@ -45,6 +46,14 @@ class Users::ProjectService
end
end
def by_project_topic(items)
if params[:topic_name].present?
items.with_project_topic_name(params[:topic_name].to_s.split(","))
else
items.with_project_topic(params[:topic_id])
end
end
def self_or_admin?
User.current.id == user.id || User.current.admin?
end