Skip to content

Commit e9def84

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

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
@@ -181,7 +181,8 @@ func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
181181
Description: form.Description,
182182
Authorize: models.ParseAccessMode(form.Permission),
183183
}
184-
if t.Authorize < models.AccessModeAdmin {
184+
185+
if t.Authorize < models.AccessModeOwner {
185186
var units = make([]*models.TeamUnit, 0, len(form.Units))
186187
for _, tp := range form.Units {
187188
units = append(units, &models.TeamUnit{
@@ -270,7 +271,7 @@ func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
270271
}
271272
}
272273
t.Description = form.Description
273-
if t.Authorize < models.AccessModeAdmin {
274+
if t.Authorize < models.AccessModeOwner {
274275
var units = make([]models.TeamUnit, 0, len(form.Units))
275276
for _, tp := range form.Units {
276277
units = append(units, models.TeamUnit{

0 commit comments

Comments
 (0)