Skip to content

Commit 6ca8fbd

Browse files
adelowotechknowlogick
authored andcommitted
Fixed bug where team with admin privelege type doesn't get any unit attached to the team (#4719)
1 parent 05dcfcf commit 6ca8fbd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

routers/org/teams.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
186186
Description: form.Description,
187187
Authorize: models.ParseAccessMode(form.Permission),
188188
}
189-
if t.Authorize < models.AccessModeAdmin {
189+
190+
if t.Authorize < models.AccessModeOwner {
190191
var units = make([]*models.TeamUnit, 0, len(form.Units))
191192
for _, tp := range form.Units {
192193
units = append(units, &models.TeamUnit{
@@ -275,7 +276,7 @@ func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
275276
}
276277
}
277278
t.Description = form.Description
278-
if t.Authorize < models.AccessModeAdmin {
279+
if t.Authorize < models.AccessModeOwner {
279280
var units = make([]models.TeamUnit, 0, len(form.Units))
280281
for _, tp := range form.Units {
281282
units = append(units, models.TeamUnit{

0 commit comments

Comments
 (0)