mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-28 12:46:09 +01:00
Merge pull request #2445 from bkcsoft/feature/fix-2442
Admins are allowed to create repos for arbitrary Orgs
This commit is contained in:
commit
1372cab35a
|
@ -57,7 +57,7 @@ func checkContextUser(ctx *middleware.Context, uid int64) *models.User {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check ownership of organization.
|
// Check ownership of organization.
|
||||||
if !org.IsOrganization() || !org.IsOwnedBy(ctx.User.Id) {
|
if !org.IsOrganization() || !(ctx.User.IsAdmin || org.IsOwnedBy(ctx.User.Id)) {
|
||||||
ctx.Error(403)
|
ctx.Error(403)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue