Skip to content

Commit

Permalink
Merge branch 'bugfix/access-to-hierarchy-browse-via-old-url' into 're…
Browse files Browse the repository at this point in the history
…lease/2024.1'

OEQ-2033 Bugfix/access to hierarchy browse via old url

See merge request edalex-group/development/oeq/openequella!412
  • Loading branch information
PenghaiZhang committed May 29, 2024
2 parents 2f859a1 + 4a1abdb commit 6312970
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions react-front-end/tsrc/mainui/IndexPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,17 @@ export default function IndexPage() {

// When the legacy path doesn't have query param 'topic or when it has but the value
// is 'ALL', render 'BrowseHierarchyPage'.
return renderProtectedPage(
routeProps,
const page =
topic === null || LegacyBrowseHierarchyLiteral.is(topic)
? BrowseHierarchyPage
: RootHierarchyPage,
[isHierarchyPageACLGranted, isViewHierarchyTopicACLGranted],
);
? renderProtectedPage(routeProps, BrowseHierarchyPage, [
isHierarchyPageACLGranted,
])
: renderProtectedPage(routeProps, RootHierarchyPage, [
isHierarchyPageACLGranted,
isViewHierarchyTopicACLGranted,
]);

return page;
}}
/>
<Route render={renderLegacyContent} />
Expand Down

0 comments on commit 6312970

Please sign in to comment.