From 5ccb626cda8ff6e20cd111e033c4ebc281eec4bf Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Sat, 22 Apr 2023 15:53:03 +0900 Subject: [PATCH] Fix owner team access mode value in team_unit table (#24224) Partly backport #23675 Co-authored-by: Giteabot --- models/organization/org.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/organization/org.go b/models/organization/org.go index 269b3e8328..fa2a604721 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, }) }