2021-01-19 19:02:51 +08:00
|
|
|
json.total_count @teams.total_count
|
2021-08-25 15:25:08 +08:00
|
|
|
json.can_add @owner.is_owner?(current_user.id) || @owner&.repo_admin_change_team_access
|
2021-01-19 19:02:51 +08:00
|
|
|
json.teams @teams.each do |team|
|
|
|
|
|
json.(team, :id, :name, :authorize)
|
2021-08-25 15:25:08 +08:00
|
|
|
json.can_remove !team.includes_all_project && (@owner.is_owner?(current_user.id) || team&.organization&.repo_admin_change_team_access)
|
2021-01-19 19:02:51 +08:00
|
|
|
end
|