Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfeafbe3

Browse files
committed
Remove multi-org check from management settings layout
We only use this layout when multi-org is enabled, so no need to run thecheck a second time.
1 parent890c761 commitfeafbe3

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

‎site/src/pages/ManagementSettingsPage/ManagementSettingsLayout.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import { Margins } from "components/Margins/Margins";
99
import{Stack}from"components/Stack/Stack";
1010
import{useAuthenticated}from"contexts/auth/RequireAuth";
1111
import{RequirePermission}from"contexts/auth/RequirePermission";
12-
import{useDashboard}from"modules/dashboard/useDashboard";
13-
import{useFeatureVisibility}from"modules/dashboard/useFeatureVisibility";
14-
importNotFoundPagefrom"pages/404Page/404Page";
1512
import{DeploySettingsContext}from"../DeploySettingsPage/DeploySettingsLayout";
1613
import{Sidebar}from"./Sidebar";
1714

@@ -33,10 +30,14 @@ export const useOrganizationSettings = (): OrganizationSettingsContextValue => {
3330
returncontext;
3431
};
3532

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+
*/
3639
exportconstManagementSettingsLayout:FC=()=>{
3740
const{ permissions}=useAuthenticated();
38-
const{ experiments}=useDashboard();
39-
constfeats=useFeatureVisibility();
4041
constdeploymentConfigQuery=useQuery(
4142
// TODO: This is probably normally fine because we will not show links to
4243
// pages that need this data, but if you manually visit the page you
@@ -46,13 +47,6 @@ export const ManagementSettingsLayout: FC = () => {
4647
);
4748
constorganizationsQuery=useQuery(organizations());
4849

49-
constcanViewOrganizations=
50-
feats.multiple_organizations&&experiments.includes("multi-organization");
51-
52-
if(!canViewOrganizations){
53-
return<NotFoundPage/>;
54-
}
55-
5650
// The deployment settings page also contains users, audit logs, groups and
5751
// organizations, so this page must be visible if you can see any of these.
5852
constcanViewDeploymentSettingsPage=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp