forked from forgejo/forgejo
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:
parent
29133f3d04
commit
6eb856c614
3 changed files with 53 additions and 3 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue