@@ -52,14 +52,17 @@ const AuthenticatedContent = withCoreUserGuard(() => {
5252 const { organizationSettings } = useEnvironment ( ) ;
5353 const { parsedOptions } = useAppearance ( ) ;
5454 const hasLogo = Boolean ( parsedOptions . logoImageUrl || logoImageUrl ) ;
55+ const { organization } = useOrganization ( ) ;
5556
5657 // Gate the entire wizard behind the org-level permission. When the
5758 // user can't manage enterprise connections, we still render the
5859 // outer sidebar/title chrome but replace the wizard with a
5960 // permissions-error message so the layout stays consistent
60- const canManageEnterpriseConnections = useProtect ( {
61- permission : 'org:sys_enterprise_connections:manage' ,
62- } ) ;
61+ const canManageEnterpriseConnections =
62+ ! ! organization &&
63+ useProtect ( {
64+ permission : 'org:sys_enterprise_connections:manage' ,
65+ } ) ;
6366
6467 const {
6568 data : enterpriseConnections ,
@@ -69,7 +72,7 @@ const AuthenticatedContent = withCoreUserGuard(() => {
6972 deleteEnterpriseConnection,
7073 revalidate : revalidateEnterpriseConnections ,
7174 } = __internal_useUserEnterpriseConnections ( {
72- enabled : canManageEnterpriseConnections ,
75+ enabled : true ,
7376 } ) ;
7477 // Currently FAPI only supports one enterprise connection per user
7578 const enterpriseConnection = enterpriseConnections ?. [ 0 ] ;
@@ -148,7 +151,7 @@ const AuthenticatedContent = withCoreUserGuard(() => {
148151 flex : 1 ,
149152 } ) }
150153 >
151- { canManageEnterpriseConnections ? (
154+ { canManageEnterpriseConnections || ! organization ? (
152155 < ConfigureSSOFlowProvider
153156 enterpriseConnection = { enterpriseConnection }
154157 isLoading = { isLoadingEnterpriseConnections }
0 commit comments