File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
datahub-web-react/src/app Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ export const SearchRoutes = (): JSX.Element => {
6161 ( me . platformPrivileges ?. manageTags || me . platformPrivileges ?. viewManageTags ) ;
6262
6363 const showIngestV2 = config . featureFlags . showIngestionPageRedesign ;
64+ const showAnalytics = ( config ?. analyticsConfig ?. enabled && me && me ?. platformPrivileges ?. viewAnalytics ) || false ;
6465
6566 return (
6667 < FinalSearchablePage >
@@ -85,7 +86,10 @@ export const SearchRoutes = (): JSX.Element => {
8586 < Route path = { PageRoutes . BROWSE_RESULTS } render = { ( ) => < BrowseResultsPage /> } />
8687 { showTags ? < Route path = { PageRoutes . MANAGE_TAGS } render = { ( ) => < ManageTags /> } /> : null }
8788 < Route path = { PageRoutes . MANAGE_APPLICATIONS } render = { ( ) => < ManageApplications /> } />
88- < Route path = { PageRoutes . ANALYTICS } render = { ( ) => < AnalyticsPage /> } />
89+ < Route
90+ path = { PageRoutes . ANALYTICS }
91+ render = { ( ) => ( showAnalytics ? < AnalyticsPage /> : < NoPageFound /> ) }
92+ />
8993 < Route path = { PageRoutes . POLICIES } render = { ( ) => < Redirect to = "/settings/permissions/policies" /> } />
9094 < Route
9195 path = { PageRoutes . SETTINGS_POLICIES }
You can’t perform that action at this time.
0 commit comments