From e9def84bf2cf5c587c648903730f6c68b5517465 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 21 Aug 2018 20:29:25 +0100 Subject: [PATCH] Fixed bug where team with admin privelege type doesn't get any unit attached to the team (#4719) (#4759) --- routers/org/teams.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routers/org/teams.go b/routers/org/teams.go index 87bfb8596..d021d5bf9 100644 --- a/routers/org/teams.go +++ b/routers/org/teams.go @@ -181,7 +181,8 @@ func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) { Description: form.Description, Authorize: models.ParseAccessMode(form.Permission), } - if t.Authorize < models.AccessModeAdmin { + + if t.Authorize < models.AccessModeOwner { var units = make([]*models.TeamUnit, 0, len(form.Units)) for _, tp := range form.Units { units = append(units, &models.TeamUnit{ @@ -270,7 +271,7 @@ func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) { } } t.Description = form.Description - if t.Authorize < models.AccessModeAdmin { + if t.Authorize < models.AccessModeOwner { var units = make([]models.TeamUnit, 0, len(form.Units)) for _, tp := range form.Units { units = append(units, models.TeamUnit{