From cb677a79248bfdd204140d41cdabc1b676a225f6 Mon Sep 17 00:00:00 2001 From: "m.lettere" Date: Thu, 12 Oct 2023 17:00:28 +0200 Subject: [PATCH] modernize role_created and role_deleted workflows and add_role_policy_permission --- templates/add_role_policy_permission.json.j2 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/add_role_policy_permission.json.j2 b/templates/add_role_policy_permission.json.j2 index 06fb954..67459cc 100644 --- a/templates/add_role_policy_permission.json.j2 +++ b/templates/add_role_policy_permission.json.j2 @@ -8,13 +8,14 @@ "inputParameters" : ["role"], "tasks" : [ { - "name": "LAMBDA_TASK", + "name": "INLINE_TASK", "taskReferenceName": "init", - "type": "LAMBDA", + "type": "INLINE", "inputParameters": { "keycloak": "{{ keycloak }}/{{ keycloak_realm }}", "keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}", - "scriptExpression": "1 == 1" + "evaluatorType" : "javascript", + "scriptExpression": "1 == 1" } }, { @@ -101,13 +102,14 @@ "joinOn" : ["retrieve_default_permission_policies","add_policy"] }, { - "name": "LAMBDA_TASK", + "name": "INLINE_TASK", "taskReferenceName": "to_policy_array", - "type": "LAMBDA", + "type": "INLINE", "inputParameters": { "newpolicy": "${add_policy.output.body}", + "evaluatorType" : "javascript", "prevpolicies" : "${retrieve_default_permission_policies.output.body}", - "scriptExpression": "return Java.to(Java.from($.prevpolicies).concat($.newpolicy),'java.util.Map[]')" + "expression": "Java.to(Java.from($.prevpolicies).concat($.newpolicy),'java.util.Map[]')" } }, {