From 006ab6d257f4d68bf76315a2f8495e557d0c2308 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Mon, 28 Aug 2023 14:37:24 -0400 Subject: [PATCH 1/2] Settings flag fix --- src/components/permissions/permissions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/permissions/permissions.tsx b/src/components/permissions/permissions.tsx index 5a14411ea..6c43db379 100644 --- a/src/components/permissions/permissions.tsx +++ b/src/components/permissions/permissions.tsx @@ -69,7 +69,7 @@ const PermissionsBase: React.FC = ({ const ocp = hasOcpAccess(userAccess); const rhel = isFinsightsFeatureEnabled && hasRhelAccess(userAccess); const ros = isRosFeatureEnabled && hasRosAccess(userAccess); - const settings = isSettingsFeatureEnabled && hasSettingsAccess(userAccess); + const settings = (costModel || hasSettingsAccess(userAccess)) && isSettingsFeatureEnabled; switch (pathname) { case formatPath(routes.explorer.path): @@ -102,7 +102,7 @@ const PermissionsBase: React.FC = ({ case formatPath(routes.rhelDetailsBreakdown.path): return rhel; case formatPath(routes.settings.path): - return costModel || settings; + return settings; default: return false; } From 9101f39514737ff910c43a2e49edbc63f204078e Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Mon, 28 Aug 2023 14:51:32 -0400 Subject: [PATCH 2/2] Fix price list path --- src/store/costModels/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/costModels/actions.ts b/src/store/costModels/actions.ts index dd8c06178..007c7cdb2 100644 --- a/src/store/costModels/actions.ts +++ b/src/store/costModels/actions.ts @@ -128,7 +128,7 @@ export const redirectToCostModelFromSourceUuid = (source_uuid: string, router: R const uuid = res.data.data[0].uuid; router.navigate( `${formatPath( - selectIsSettingsFeatureEnabled(getState()) ? routes.settings.path : routes.costModelsDetails.path + selectIsSettingsFeatureEnabled(getState()) ? routes.costModel.basePath : routes.costModelsDetails.path )}/${uuid}` ); })