Skip to content

Commit

Permalink
Merge pull request #3365 from dlabrecq/settings-flag
Browse files Browse the repository at this point in the history
Settings flag fix
  • Loading branch information
dlabrecq authored Aug 28, 2023
2 parents 98fdd99 + 9101f39 commit e7d1fa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/permissions/permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const PermissionsBase: React.FC<PermissionsProps> = ({
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):
Expand Down Expand Up @@ -102,7 +102,7 @@ const PermissionsBase: React.FC<PermissionsProps> = ({
case formatPath(routes.rhelDetailsBreakdown.path):
return rhel;
case formatPath(routes.settings.path):
return costModel || settings;
return settings;
default:
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/costModels/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);
})
Expand Down

0 comments on commit e7d1fa6

Please sign in to comment.