From 68712f9b4c1cd3fcdce9922e3ebe76a2447b4c83 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 25 Aug 2021 15:25:08 +0800 Subject: [PATCH] add: project team can add authorize --- app/views/projects/teams/index.json.jbuilder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/projects/teams/index.json.jbuilder b/app/views/projects/teams/index.json.jbuilder index 0a48e884d..0b74a37a4 100644 --- a/app/views/projects/teams/index.json.jbuilder +++ b/app/views/projects/teams/index.json.jbuilder @@ -1,5 +1,6 @@ json.total_count @teams.total_count +json.can_add @owner.is_owner?(current_user.id) || @owner&.repo_admin_change_team_access json.teams @teams.each do |team| json.(team, :id, :name, :authorize) - json.can_remove !team.includes_all_project && team&.organization&.repo_admin_change_team_access + json.can_remove !team.includes_all_project && (@owner.is_owner?(current_user.id) || team&.organization&.repo_admin_change_team_access) end \ No newline at end of file