fix: remove plan checks from SSO Config Query (#44394)

`useOrgSSOConfigQuery` had an internal plan-based gate
(`canSetupSSOConfig`) that permanently disabled the query for
non-team/enterprise orgs.

The fix removes the redundant plan gate from the query hook, plan-based
access is already controlled upstream via the entitlement check in the
component.
This commit is contained in:
Ignacio Dobronich authored and GitHub committed 2026-03-31 12:32:52 -03:00
1 parent c689e91160
commit 23f90cc899
1 file changed
+1 -5
+1 -5
View File
@@ -42,14 +42,10 @@ export const useOrgSSOConfigQuery = <TData = OrgSSOConfigData>(
...options
}: UseCustomQueryOptions<OrgSSOConfigData, OrgSSOConfigError, TData> = {}
) => {
const { data: organization } = useSelectedOrganizationQuery()
const plan = organization?.plan.id
const canSetupSSOConfig = ['team', 'enterprise', 'platform'].includes(plan ?? '')
return useQuery<OrgSSOConfigData, OrgSSOConfigError, TData>({
queryKey: orgSSOKeys.orgSSOConfig(orgSlug),
queryFn: ({ signal }) => getOrgSSOConfig({ orgSlug }, signal),
enabled: enabled && IS_PLATFORM && typeof orgSlug !== 'undefined' && canSetupSSOConfig,
enabled: enabled && IS_PLATFORM && typeof orgSlug !== 'undefined',
...options,
})
}