Only show published catalog resources
What does this MR do and why?
This MR blocks access to the catalog resource details page if the resource is not published. Users might not want draft resources to be visible, and draft resources will have incomplete data so the page will not load correctly.
Changelog: fixed
How to set up and validate locally
- Ensure that the Catalog feature flag is enabled:
Feature.enable(:global_ci_catalog)
- Create a catalog resource
- Get the ID of the catalog resource from the Rails console:
::Ci::Catalog::Resource.last.id
- Go to
GDK/explore/catalog/RESOURCE_ID
and see that you get a 404
Note: if you navigate to the resource detail page from a link in the Catalog, you will not get a 404. This is because the Catalog Vue app does not reload. The fix for that behavior is to only render published resources, which will happen in #415414 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #431521 (closed)
Edited by Avielle Wolfe