mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add owner team permission check test (#24096)
Add test for https://github.com/go-gitea/gitea/pull/23675 Should be merged after #24117 --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -342,11 +342,15 @@ func CreateOrganization(org *Organization, owner *user_model.User) (err error) {
|
||||
// insert units for team
|
||||
units := make([]TeamUnit, 0, len(unit.AllRepoUnitTypes))
|
||||
for _, tp := range unit.AllRepoUnitTypes {
|
||||
up := perm.AccessModeOwner
|
||||
if tp == unit.TypeExternalTracker || tp == unit.TypeExternalWiki {
|
||||
up = perm.AccessModeRead
|
||||
}
|
||||
units = append(units, TeamUnit{
|
||||
OrgID: org.ID,
|
||||
TeamID: t.ID,
|
||||
Type: tp,
|
||||
AccessMode: perm.AccessModeOwner,
|
||||
AccessMode: up,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user