mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
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:
1 parent
c689e91160
commit
23f90cc899
1 file changed
+1
-5
@@ -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,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user