create user add to vre and parent groups (feature #21866)

This commit is contained in:
Marco Lettere 2021-09-22 11:45:01 +02:00
parent 2674901cec
commit a6a2f7a367
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@
"type": "LAMBDA", "type": "LAMBDA",
"inputParameters": { "inputParameters": {
"groups" : "${extract_groups.output.result.groups}", "groups" : "${extract_groups.output.result.groups}",
"auth" : "${authorize.output.body.access_token}", "auth" : "Bearer ${authorize.output.body.access_token}",
"kc_user_url" : "${init.input.keycloak_admin}/users/${select_user.output.result[0].id}/groups/", "kc_user_url" : "${init.input.keycloak_admin}/users/${select_user.output.result[0].id}/groups/",
"scriptExpression": "inputs={};tasks=[];for(var i=0;i<$.groups.length;i++)group=$.groups[i],tasks.push({name:'pyrest',type:'SIMPLE',taskReferenceName:'user_to_group_'+i}),inputs['user_to_group_'+i]={ url : $.kc_user_url + group.id, method : 'PUT', headers: { Authorization : $.auth} };return {tasks:Java.to(tasks,'java.util.Map[]'),inputs:inputs};" "scriptExpression": "inputs={};tasks=[];for(var i=0;i<$.groups.length;i++)group=$.groups[i],tasks.push({name:'pyrest',type:'SIMPLE',taskReferenceName:'user_to_group_'+i}),inputs['user_to_group_'+i]={ url : $.kc_user_url + group.id, method : 'PUT', headers: { Authorization : $.auth} };return {tasks:Java.to(tasks,'java.util.Map[]'),inputs:inputs};"
} }