api/repo: check user type of owner for migration

Report by MiaoWoo.
This commit is contained in:
Unknwon
2017-04-06 01:20:20 -04:00
parent 1a04da864f
commit f191bff0b9

View File

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