新增:组织数据修复任务

This commit is contained in:
2022-10-15 11:29:23 +08:00
parent 6383384287
commit 630a7aadeb
2 changed files with 40 additions and 0 deletions
+11
View File
@@ -70,4 +70,15 @@ class Team < ApplicationRecord
end
end
def to_gitea_hash
{
can_create_org_repo: self.can_create_org_project,
description: self.description || "",
includes_all_repositories: self.includes_all_project,
name: self.name,
permission: self.authorize,
units: self.team_units.pluck(:unit_type).map{|i| "repo.#{i}"}
}
end
end