diff --git a/models/organization/org.go b/models/organization/org.go index 269b3e83288dc..fa2a604721288 100644 --- a/models/organization/org.go +++ b/models/organization/org.go @@ -338,9 +338,10 @@ func CreateOrganization(org *Organization, owner *user_model.User) (err error) { units := make([]TeamUnit, 0, len(unit.AllRepoUnitTypes)) for _, tp := range unit.AllRepoUnitTypes { units = append(units, TeamUnit{ - OrgID: org.ID, - TeamID: t.ID, - Type: tp, + OrgID: org.ID, + TeamID: t.ID, + Type: tp, + AccessMode: perm.AccessModeOwner, }) }