mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 20:55:46 +08:00
修改我的项目的后端参数
This commit is contained in:
@@ -107,4 +107,16 @@ class Project < ApplicationRecord
|
||||
Project.where.not(id: (user_not_show_1 - user_show_2).uniq)
|
||||
end
|
||||
|
||||
def members_count
|
||||
members.select(:id).size
|
||||
end
|
||||
|
||||
def issues_count
|
||||
issues.select(:id).size
|
||||
end
|
||||
|
||||
def can_visited?
|
||||
is_public? || User.current.admin? || member?(User.current)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user