Browse Source

api/repo: check user type of owner for migration

Report by MiaoWoo.
pull/4248/merge
Unknwon 8 years ago
parent
commit
f191bff0b9
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 3
      routers/api/v1/repo/repo.go

3
routers/api/v1/repo/repo.go

@ -220,6 +220,9 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
ctx.Error(500, "GetUserByID", err) ctx.Error(500, "GetUserByID", err)
} }
return return
} else if !org.IsOrganization() {
ctx.Error(403, "", err)
return
} }
ctxUser = org ctxUser = org
} }

Loading…
Cancel
Save