mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
15 lines
230 B
Ruby
15 lines
230 B
Ruby
module ProjectAbility
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
|
|
end
|
|
|
|
def can_read_project?(project)
|
|
return true if self.admin?
|
|
return false if !project.is_public? && !project.member?(self.id)
|
|
true
|
|
end
|
|
|
|
end
|