Admins are allowed to create repos for arbitrary Orgs

tokarchuk/v1.17
Kim "BKC" Carlbäcker 9 years ago
parent 7ef9a05588
commit a3eab8185d
  1. 2
      routers/repo/repo.go

@ -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
}

Loading…
Cancel
Save