diff --git a/bin/createUser.sh b/bin/createUser.sh index e4b6db5..d2c9acb 100755 --- a/bin/createUser.sh +++ b/bin/createUser.sh @@ -637,16 +637,21 @@ userPassword: {CRYPT}${pass}\n\n' | ldapmodify -c -H ldap://${LDAP_IP} -D \"cn=$ # et enfin on ajoute toujours le user à l'équipe KAZ et aux 2 channels publiques - curl -s -X PUT "https://${URL_AGORA}/api/v4/teams/${KAZ_ID}/members/\${USER_ID}" \ + curl -s -X POST "https://${URL_AGORA}/api/v4/teams/${KAZ_ID}/members \ -H "Authorization: Bearer ${mattermost_token}" \ -H "Content-Type: application/json" + -d '{ "team_id": "${KAZ_ID}", "user_id": "\${USER_ID}"}' - curl -s -X PUT "https://${URL_AGORA}/api/v4/channels/${CHAN1_ID}/members/\${USER_ID}" \ + curl -s -X POST "https://${URL_AGORA}/api/v4/channels/${CHAN1_ID}/members" \ -H "Authorization: Bearer ${mattermost_token}" \ -H "Content-Type: application/json" - curl -s -X PUT "https://${URL_AGORA}/api/v4/channels/${CHAN2_ID}/members/\${USER_ID}" \ + -d '{ "user_id": "\${USER_ID}"}' + + curl -s -X POST "https://${URL_AGORA}/api/v4/channels/${CHAN2_ID}/members" \ -H "Authorization: Bearer ${mattermost_token}" \ -H "Content-Type: application/json" + -d '{ "user_id": "\${USER_ID}"}' + EOF # echo "docker exec -i mattermostServ bin/mmctl channel users add kaz:une-question--un-soucis ${EMAIL_SOUHAITE}" | tee -a "${CMD_LOGIN}"