mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-19 02:34:37 -05:00
fix(normalization): update allowed integrations checks to be fully lowercase (#3248)
This commit is contained in:
@@ -227,7 +227,7 @@ export function Integrations({ onOpenChange, registerCloseHandler }: Integration
|
||||
(acc, service) => {
|
||||
if (
|
||||
permissionConfig.allowedIntegrations !== null &&
|
||||
!permissionConfig.allowedIntegrations.includes(service.id.replace(/-/g, '_'))
|
||||
!permissionConfig.allowedIntegrations.includes(service.id.replace(/-/g, '_').toLowerCase())
|
||||
) {
|
||||
return acc
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ function useAllowedIntegrationsFromEnv() {
|
||||
*/
|
||||
function intersectAllowlists(a: string[] | null, b: string[] | null): string[] | null {
|
||||
if (a === null) return b
|
||||
if (b === null) return a
|
||||
if (b === null) return a.map((i) => i.toLowerCase())
|
||||
return a.map((i) => i.toLowerCase()).filter((i) => b.includes(i))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user