diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index e0f62baf5..3f0e8025d 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -220,6 +220,9 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) { ctx.Error(500, "GetUserByID", err) } return + } else if !org.IsOrganization() { + ctx.Error(403, "", err) + return } ctxUser = org }