Skip to content

Commit 3eb8e47

Browse files
committed
fix(access-control): expose merged allowedIntegrations on config to prevent bypass via direct access
1 parent d8ba0bf commit 3eb8e47

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,14 @@ export function usePermissionConfig(): PermissionConfigResult {
114114
return featureFlagDisabled || config.disableInvitations
115115
}, [config.disableInvitations])
116116

117+
const mergedConfig = useMemo(
118+
() => ({ ...config, allowedIntegrations: mergedAllowedIntegrations }),
119+
[config, mergedAllowedIntegrations]
120+
)
121+
117122
return useMemo(
118123
() => ({
119-
config,
124+
config: mergedConfig,
120125
isLoading,
121126
isInPermissionGroup,
122127
filterBlocks,
@@ -126,7 +131,7 @@ export function usePermissionConfig(): PermissionConfigResult {
126131
isInvitationsDisabled,
127132
}),
128133
[
129-
config,
134+
mergedConfig,
130135
isLoading,
131136
isInPermissionGroup,
132137
filterBlocks,

0 commit comments

Comments
 (0)