Chore: Account deletion via API (#10137)

This commit is contained in:
Rory Powell 2023-03-28 14:49:46 +01:00 committed by GitHub
parent b173e80582
commit 06794d8085
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ export async function destroy(ctx: UserCtx) {
const user = ctx.user!
const tenantId = ctx.params.tenantId
if (tenantId !== user.tenantId) {
if (!ctx.internal && tenantId !== user.tenantId) {
ctx.throw(403, "Tenant ID does not match current user")
}