need user-account-id to add role
This commit is contained in:
parent
e3bc4c24e0
commit
31c09e1ae7
|
@ -69,6 +69,19 @@
|
|||
"scriptExpression": "var client_id = $.client_location.split('/').pop(); return {'client_id' : client_id}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "get_service_account_user",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/service-account-user",
|
||||
"method" : "GET",
|
||||
"headers" : {
|
||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
||||
"Accept" : "application/json"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "get_all_contexts",
|
||||
|
@ -88,7 +101,7 @@
|
|||
"type": "LAMBDA",
|
||||
"inputParameters": {
|
||||
"contexts" : "${get_all_contexts.output.body}",
|
||||
"id" : "${extract_client_id.output.result.client_id}",
|
||||
"id" : "${get_service_account_user.output.body.id}",
|
||||
"scriptExpression": "inputs={},tasks=[];for(var i=0;i<$.contexts.length;i++)c=$.contexts[i],tasks.push({name:'sub_workflow_task',type:'SUB_WORKFLOW',taskReferenceName:'call_add_all_member_roles_'+i, subWorkflowParam:{ name:'add_all_member_roles'}}),inputs['call_add_all_member_roles_'+i]={context:c, client:$.id};return {tasks:Java.to(tasks,'java.util.Map[]'),inputs:inputs};"
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue