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

Commitfbea545

Browse files
committed
feat: - hide custom roles tab if experiment is not enabled
1 parent68eae17 commitfbea545

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

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

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,21 @@ import Button from "@mui/material/Button";
33
import{typeFC,useEffect}from"react";
44
import{Helmet}from"react-helmet-async";
55
import{useQuery}from"react-query";
6-
import{LinkasRouterLink,useLocation,useParams}from"react-router-dom";
6+
import{LinkasRouterLink,useParams}from"react-router-dom";
77
import{getErrorMessage}from"api/errors";
88
import{organizationRoles}from"api/queries/roles";
99
import{displayError}from"components/GlobalSnackbar/utils";
1010
import{PageHeader,PageHeaderTitle}from"components/PageHeader/PageHeader";
1111
import{useAuthenticated}from"contexts/auth/RequireAuth";
12-
import{useDashboard}from"modules/dashboard/useDashboard";
1312
import{useFeatureVisibility}from"modules/dashboard/useFeatureVisibility";
1413
import{pageTitle}from"utils/page";
1514
importCustomRolesPageViewfrom"./CustomRolesPageView";
1615

1716
exportconstCustomRolesPage:FC=()=>{
1817
const{ permissions}=useAuthenticated();
1918
const{assignOrgRole:canAssignOrgRole}=permissions;
20-
const{
21-
multiple_organizations:organizationsEnabled,
22-
custom_roles:isCustomRolesEnabled,
23-
}=useFeatureVisibility();
24-
const{ experiments}=useDashboard();
25-
constlocation=useLocation();
19+
const{custom_roles:isCustomRolesEnabled}=useFeatureVisibility();
20+
2621
const{ organization="default"}=useParams()as{organization:string};
2722
constorganizationRolesQuery=useQuery(organizationRoles(organization));
2823
constfilteredRoleData=organizationRolesQuery.data?.filter(
@@ -40,16 +35,6 @@ export const CustomRolesPage: FC = () => {
4035
}
4136
},[organizationRolesQuery.error]);
4237

43-
// if (
44-
// organizationsEnabled &&
45-
// experiments.includes("multi-organization") &&
46-
// location.pathname === "/deployment/groups"
47-
// ) {
48-
// const defaultName =
49-
// getOrganizationNameByDefault(organizations) ?? "default";
50-
// return <Navigate to={`/organizations/${defaultName}/groups`} replace />;
51-
// }
52-
5338
return(
5439
<>
5540
<Helmet>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp