Skip to content

Commit 86ca984

Browse files
authored
fix(normalization): update allowed integrations checks to be fully lowercase (#3248)
1 parent e396462 commit 86ca984

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/integrations/integrations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export function Integrations({ onOpenChange, registerCloseHandler }: Integration
227227
(acc, service) => {
228228
if (
229229
permissionConfig.allowedIntegrations !== null &&
230-
!permissionConfig.allowedIntegrations.includes(service.id.replace(/-/g, '_'))
230+
!permissionConfig.allowedIntegrations.includes(service.id.replace(/-/g, '_').toLowerCase())
231231
) {
232232
return acc
233233
}

apps/sim/hooks/use-permission-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function useAllowedIntegrationsFromEnv() {
4444
*/
4545
function intersectAllowlists(a: string[] | null, b: string[] | null): string[] | null {
4646
if (a === null) return b
47-
if (b === null) return a
47+
if (b === null) return a.map((i) => i.toLowerCase())
4848
return a.map((i) => i.toLowerCase()).filter((i) => b.includes(i))
4949
}
5050

0 commit comments

Comments
 (0)