api/repo: check user type of owner for migration

Report by MiaoWoo.
master
Unknwon 2017-04-06 01:20:20 -04:00
parent 1a04da864f
commit f191bff0b9
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
1 changed files with 3 additions and 0 deletions

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
}