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:
@@ -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`:
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user