File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ func EditTeam(ctx *context.APIContext) {
262262 }
263263
264264 if form .CanCreateOrgRepo != nil {
265- team .CanCreateOrgRepo = * form .CanCreateOrgRepo
265+ team .CanCreateOrgRepo = team . IsOwnerTeam () || * form .CanCreateOrgRepo
266266 }
267267
268268 if len (form .Name ) > 0 {
Original file line number Diff line number Diff line change @@ -416,7 +416,11 @@ func EditTeamPost(ctx *context.Context) {
416416 isIncludeAllChanged = true
417417 t .IncludesAllRepositories = includesAllRepositories
418418 }
419+ t .CanCreateOrgRepo = form .CanCreateOrgRepo
420+ } else {
421+ t .CanCreateOrgRepo = true
419422 }
423+
420424 t .Description = form .Description
421425 if t .AccessMode < perm .AccessModeAdmin {
422426 units := make ([]organization.TeamUnit , 0 , len (unitPerms ))
@@ -433,7 +437,6 @@ func EditTeamPost(ctx *context.Context) {
433437 return
434438 }
435439 }
436- t .CanCreateOrgRepo = form .CanCreateOrgRepo
437440
438441 if ctx .HasError () {
439442 ctx .HTML (http .StatusOK , tplTeamNew )
You can’t perform that action at this time.
0 commit comments