@@ -9,9 +9,6 @@ import { Margins } from "components/Margins/Margins";
9
9
import { Stack } from "components/Stack/Stack" ;
10
10
import { useAuthenticated } from "contexts/auth/RequireAuth" ;
11
11
import { RequirePermission } from "contexts/auth/RequirePermission" ;
12
- import { useDashboard } from "modules/dashboard/useDashboard" ;
13
- import { useFeatureVisibility } from "modules/dashboard/useFeatureVisibility" ;
14
- import NotFoundPage from "pages/404Page/404Page" ;
15
12
import { DeploySettingsContext } from "../DeploySettingsPage/DeploySettingsLayout" ;
16
13
import { Sidebar } from "./Sidebar" ;
17
14
@@ -33,10 +30,14 @@ export const useOrganizationSettings = (): OrganizationSettingsContextValue => {
33
30
return context ;
34
31
} ;
35
32
33
+ /**
34
+ * A multi-org capable settings page layout.
35
+ *
36
+ * If multi-org is not enabled or licensed, this is the wrong layout to use.
37
+ * See DeploySettingsLayoutInner instead.
38
+ */
36
39
export const ManagementSettingsLayout :FC = ( ) => {
37
40
const { permissions} = useAuthenticated ( ) ;
38
- const { experiments} = useDashboard ( ) ;
39
- const feats = useFeatureVisibility ( ) ;
40
41
const deploymentConfigQuery = useQuery (
41
42
// TODO: This is probably normally fine because we will not show links to
42
43
// pages that need this data, but if you manually visit the page you
@@ -46,13 +47,6 @@ export const ManagementSettingsLayout: FC = () => {
46
47
) ;
47
48
const organizationsQuery = useQuery ( organizations ( ) ) ;
48
49
49
- const canViewOrganizations =
50
- feats . multiple_organizations && experiments . includes ( "multi-organization" ) ;
51
-
52
- if ( ! canViewOrganizations ) {
53
- return < NotFoundPage /> ;
54
- }
55
-
56
50
// The deployment settings page also contains users, audit logs, groups and
57
51
// organizations, so this page must be visible if you can see any of these.
58
52
const canViewDeploymentSettingsPage =