Backend: Update Catalog policies
Problem
We need to update the Catalog policies to meet 2 changes:
- Global Catalog is now a FOSS feature
- Adding a catalog resource is now a FOSS feature
- We will have a Premium feature tab that allows users to filter by their namespaces
Proposed solution
We need 3 policies:
-
add_catalog_resource
- remove Premium feature restriction -
read_catalog_resource
- new policy, allowed if the resource is published and visible to the user (user canread_code
- see https://gitlab.slack.com/archives/C060C2CPH7Z/p1698058953633019?thread_ts=1698055517.908669&cid=C060C2CPH7Z) -
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