mirror of
https://github.com/gogs/gogs.git
synced 2026-06-23 13:50:04 +02:00
api/repo: check user type of owner for migration
Report by MiaoWoo.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user