Skip to content

Don't display package details page for packages not in the default status

🔥 Problem

From the package list page, we can right click on the package name and select "open in a new tab". This will open a new tab with the package details page.

The problem is that we have a status on the package object and not all the statuses allow the package to be displayed in the details page.

Here are all the statuses.

Here are the definition of displayable and installable statuses

🚒 Solution

  • Choose which statuses are allowed to be displayed in the details page. Either displayable or installable.
  • On the backend side, at the controller level, don't allow package in the wrong status to be loaded and return 404
  • On the frontend side, in the packages list page. Packages in the wrong status should not generate a link to the details page.

Implementation guide

frontend

  • Update GraphQL query based on !101416 (merged)
  • Update component to render router-link only when _links.webPath contains link to details page
  • fallback to rendering just the text if _links.webPath is null
Edited by Rahul Chanila