From 8c8430b52db22fa4e7a051921f134a907e9cbc44 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Fri, 22 Dec 2023 10:02:45 +0100 Subject: [PATCH] scaffolder-backend: fix permission rule schema Signed-off-by: Vincenzo Scamporlino --- plugins/scaffolder-backend/src/service/rules.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/service/rules.ts b/plugins/scaffolder-backend/src/service/rules.ts index 19b34b9f7c..b197810757 100644 --- a/plugins/scaffolder-backend/src/service/rules.ts +++ b/plugins/scaffolder-backend/src/service/rules.ts @@ -106,7 +106,9 @@ function buildHasProperty>({ key: z .string() .describe(`Property within the action parameters to match on`), - value: valueSchema.describe(`Value of the given property to match on`), + value: valueSchema + .optional() + .describe(`Value of the given property to match on`), }) as unknown as z.ZodType<{ key: string; value?: z.infer }>, apply: (resource, { key, value }) => { const foundValue = get(resource.input, key);