1
0
Fork 0
forked from forgejo/forgejo

Fix owners cannot create organization repos bug (#20841)

* Fix owners cannot create organization repos bug

* Fix api

* Update routers/api/v1/org/team.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

Co-authored-by: Gusted <williamzijl7@hotmail.com>
This commit is contained in:
Lunny Xiao 2022-08-18 16:58:21 +08:00 committed by GitHub
parent 5d0f643461
commit 999392f6a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -262,7 +262,7 @@ func EditTeam(ctx *context.APIContext) {
}
if form.CanCreateOrgRepo != nil {
team.CanCreateOrgRepo = *form.CanCreateOrgRepo
team.CanCreateOrgRepo = team.IsOwnerTeam() || *form.CanCreateOrgRepo
}
if len(form.Name) > 0 {