Chore: Account deletion via API (#10137)
This commit is contained in:
parent
296ada4715
commit
aa9ef56326
|
@ -5,7 +5,7 @@ export async function destroy(ctx: UserCtx) {
|
||||||
const user = ctx.user!
|
const user = ctx.user!
|
||||||
const tenantId = ctx.params.tenantId
|
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")
|
ctx.throw(403, "Tenant ID does not match current user")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue