Skip to content

Commit 5ccb626

Browse files
yp05327GiteaBot
andauthored
Fix owner team access mode value in team_unit table (#24224)
Partly backport #23675 Co-authored-by: Giteabot <[email protected]>
1 parent b00f7c3 commit 5ccb626

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

models/organization/org.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ func CreateOrganization(org *Organization, owner *user_model.User) (err error) {
338338
units := make([]TeamUnit, 0, len(unit.AllRepoUnitTypes))
339339
for _, tp := range unit.AllRepoUnitTypes {
340340
units = append(units, TeamUnit{
341-
OrgID: org.ID,
342-
TeamID: t.ID,
343-
Type: tp,
341+
OrgID: org.ID,
342+
TeamID: t.ID,
343+
Type: tp,
344+
AccessMode: perm.AccessModeOwner,
344345
})
345346
}
346347

0 commit comments

Comments
 (0)