mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: environments route should be hidden from menu for open-source (#8397)
This commit is contained in:
parent
23b0401381
commit
178940ce7f
@ -28,6 +28,11 @@ export const filterByConfig =
|
||||
return Boolean(config[r.configFlag]);
|
||||
}
|
||||
|
||||
const isOss = !config?.versionInfo?.current?.enterprise;
|
||||
if (isOss && r.enterprise) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
@ -511,6 +511,7 @@ export const getCondensedRoutes = (routes: IRoute[]): INavigationMenuItem[] => {
|
||||
menu: route.menu,
|
||||
configFlag: route.configFlag,
|
||||
notFlag: route.notFlag,
|
||||
enterprise: route.enterprise,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
@ -230,10 +230,14 @@ const ProjectEnvironmentList = () => {
|
||||
initialValue={globalFilter}
|
||||
onChange={setGlobalFilter}
|
||||
/>
|
||||
<PageHeader.Divider />
|
||||
<Link component={RouterLink} to='/environments'>
|
||||
Configure environments
|
||||
</Link>
|
||||
{!isOss() ? (
|
||||
<>
|
||||
<PageHeader.Divider />
|
||||
<Link component={RouterLink} to='/environments'>
|
||||
Configure environments
|
||||
</Link>
|
||||
</>
|
||||
) : null}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
@ -25,6 +25,7 @@ export interface INavigationMenuItem {
|
||||
notFlag?: keyof UiFlags;
|
||||
configFlag?: keyof IUiConfig;
|
||||
group?: string;
|
||||
enterprise?: boolean;
|
||||
}
|
||||
|
||||
interface IRouteMenu {
|
||||
|
Loading…
Reference in New Issue
Block a user