diff --git a/packages/worker/src/api/controllers/system/tenants.ts b/packages/worker/src/api/controllers/system/tenants.ts index 151507358f..ddc6c39c0f 100644 --- a/packages/worker/src/api/controllers/system/tenants.ts +++ b/packages/worker/src/api/controllers/system/tenants.ts @@ -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") }