Create a way to enable SQS for all tenants.

This commit is contained in:
Sam Rose 2024-07-10 15:22:18 +01:00
parent b06eb277a4
commit 56c6742a0e
No known key found for this signature in database
1 changed files with 8 additions and 0 deletions

View File

@ -222,5 +222,13 @@ export function isSqsEnabledForTenant(): boolean {
) )
} }
// Special case to enable all tenants, for testing in QA.
if (
env.SQS_SEARCH_ENABLE_TENANTS.length === 1 &&
env.SQS_SEARCH_ENABLE_TENANTS[0] === "*"
) {
return true
}
return env.SQS_SEARCH_ENABLE_TENANTS.includes(tenantId) return env.SQS_SEARCH_ENABLE_TENANTS.includes(tenantId)
} }