修复:open_portrait函数丢失

This commit is contained in:
yystopf 2024-09-13 14:29:35 +08:00
parent cadafb6fe0
commit b676462dd7
1 changed files with 4 additions and 0 deletions

View File

@ -468,6 +468,10 @@ class Project < ApplicationRecord
$redis_cache.hdel("issue_cache_delete_count", self.id)
end
def open_portrait
EduSetting.get("open_portrait_projects").present? ? EduSetting.get("open_portrait_projects").split(",").include?(self.id.to_s) : false
end
def actionable
return false if EduSetting.get("project_user_actionable").nil?
return EduSetting.get("project_user_actionable").split(",").include?(self.owner&.login)