Skip to content

Backend: Update Catalog policies

Problem

We need to update the Catalog policies to meet 2 changes:

  1. Global Catalog is now a FOSS feature
  2. Adding a catalog resource is now a FOSS feature
  3. We will have a Premium feature tab that allows users to filter by their namespaces

Proposed solution

We need 3 policies:

  1. add_catalog_resource - remove Premium feature restriction
  2. read_catalog_resource - new policy, allowed if the resource is published and visible to the user (user can read_code - see https://gitlab.slack.com/archives/C060C2CPH7Z/p1698058953633019?thread_ts=1698055517.908669&cid=C060C2CPH7Z)
  3. read_namespace_catalog - this can stay the same

Notes:

  • add_catalog_resource - still used in all the existing places
  • read_namespace_catalog - should be removed from existing uses, new uses will be added in the future
  • read_catalog_resource - should be added as a guard for single resource GraphQL query
Edited by Avielle Wolfe