1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-28 12:13:10 +00:00

Admins are allowed to create repos for arbitrary Orgs

This commit is contained in:
Kim "BKC" Carlbäcker 2016-01-20 14:46:45 +01:00
parent 7ef9a05588
commit a3eab8185d

View file

@ -57,7 +57,7 @@ func checkContextUser(ctx *middleware.Context, uid int64) *models.User {
}
// 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)
return nil
}