mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 17:17:19 +00:00
Fix owner team access mode value in team_unit table (#23675)
All `access_mode` value of Owner Teams are 0(AccessModeNone) in `team_unit` table, which should be 4(AccessModeOwner) In `team` table:  In `team_unit` table:  ps: In https://github.com/go-gitea/gitea/pull/23630, `access_mode` in `team_unit` is used to check the team unit permission, but I found that user can not see issues in owned org repos.
This commit is contained in:
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user