From d03426c5ad6796b0aa3a59d6f6b4b2bff48c7db8 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Mon, 3 Apr 2023 18:08:12 +0200 Subject: [PATCH] remove actionId parameter Signed-off-by: Vincenzo Scamporlino --- plugins/scaffolder-backend/src/service/rules.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/scaffolder-backend/src/service/rules.ts b/plugins/scaffolder-backend/src/service/rules.ts index 30aebd1583..6611fcefbf 100644 --- a/plugins/scaffolder-backend/src/service/rules.ts +++ b/plugins/scaffolder-backend/src/service/rules.ts @@ -75,15 +75,10 @@ export const hasInputProperty = createActionPermissionRule({ resourceType: RESOURCE_TYPE_SCAFFOLDER_ACTION, description: `Matches the key and value of the input of an action`, paramsSchema: z.object({ - action: z.string().describe('Name of the actionId to match on'), key: z.string().describe('Name of the property to match on'), value: z.string().describe('Value of the property to match on').optional(), }), - apply: (resource, { action, key, value }) => { - if (resource.action !== action) { - return true; - } - + apply: (resource, { key, value }) => { const foundValue = get(resource.input, key); if (Array.isArray(foundValue)) {