Skip to content

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

  1. Ensure that the Catalog feature flag is enabled: Feature.enable(:global_ci_catalog)
  2. Create a catalog resource
  3. Get the ID of the catalog resource from the Rails console: ::Ci::Catalog::Resource.last.id
  4. 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.

Related to #431521 (closed)

Edited by Avielle Wolfe

Merge request reports

Loading