From 3312071f2d646d537f473cd04fc67f42fbea5a0a Mon Sep 17 00:00:00 2001 From: Fab Date: Mon, 6 Jul 2026 02:40:28 +0200 Subject: [PATCH] correction createUser --- bin/createUser.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bin/createUser.sh b/bin/createUser.sh index d2c9acb..5e238e4 100755 --- a/bin/createUser.sh +++ b/bin/createUser.sh @@ -615,7 +615,7 @@ userPassword: {CRYPT}${pass}\n\n' | ldapmodify -c -H ldap://${LDAP_IP} -D \"cn=$ fi if grep -q "^${IDENT_KAZ}$" "${TFILE_MM}" 2>/dev/null; then - echo "${IDENT_KAZ} existe déjà sur mattermost" | tee -a "${LOG}" + echo "${IDENT_KAZ} existe déjà sur mattermost" | tee -a "${LOG}" else # on créé le compte mattermost @@ -637,21 +637,20 @@ 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 POST "https://${URL_AGORA}/api/v4/teams/${KAZ_ID}/members \ + 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}"}' + -H "Content-Type: application/json" \ + -d '{ "team_id": "${KAZ_ID}", "user_id": "'"\${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" - -d '{ "user_id": "\${USER_ID}"}' + -H "Content-Type: application/json" \ + -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}"}' - + -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}"