Skip to content

Commit f191bff

Browse files
committed
api/repo: check user type of owner for migration
Report by MiaoWoo.
1 parent 1a04da8 commit f191bff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

routers/api/v1/repo/repo.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
220220
ctx.Error(500, "GetUserByID", err)
221221
}
222222
return
223+
} else if !org.IsOrganization() {
224+
ctx.Error(403, "", err)
225+
return
223226
}
224227
ctxUser = org
225228
}

0 commit comments

Comments
 (0)