Apply suggestions from code review

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2025-09-11 20:33:46 +02:00
parent 77980e3f80
commit 3c3466dd51
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
'@backstage/plugin-catalog-backend': minor
---
Add support for specifying an entity `spec.type` in `catalog.rules.allow` rules within the catalog configuration.
Add support for specifying an entity `spec.type` in `catalog.rules` and `catalog.locations.rules` within the catalog configuration.
For example, this enables allowing all `Template` entities with the type `website`:
+2 -2
View File
@@ -39,8 +39,8 @@ export interface Config {
*
* E.g. ["Component", "API", "Template", "Location"]
*
* You can also specify the type of the entity by using an object with `kind` and optional `type` properties.
* E.g. [{ kind: "Component", type: "service" }]
* You can also specify the type of the entity by using an object with `kind` and optional `spec.type` properties.
* E.g. [{ kind: "Component", 'spec.type': "service" }]
*/
allow: Array<string | { kind: string; 'spec.type'?: string }>;
/**
@@ -83,7 +83,7 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer {
* - allow: [Component, API]
* - allow:
* - kind: Resource
* type: database
* 'spec.type': database
* - allow: [Template]
* locations:
* - type: url