Changeset 111076 in spip-zone


Ignore:
Timestamp:
Jul 10, 2018, 7:12:40 AM (5 months ago)
Author:
cam.lafit@…
Message:

fixup! S'assurer de creer tous les profils utilisateurs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _outils_/svn2git/trunk/create_user_gitea.sh

    r111075 r111076  
    4646            email=${BASH_REMATCH[1]}
    4747            password=${BASH_REMATCH[2]}
     48            username=${email%@*}
     49            username_2=${email/@/.}
    4850    fi
    4951
     
    5759    curl -H "Authorization: token $GITEA_TOKEN" \
    5860            -X POST \
    59             --data "username=${email%@*}&email=$email&password=$password" \
     61            --data "username=$username&email=$email&password=$password" \
    6062            $GITEA_HOST/api/v1/admin/users
    6163    #Se prémunir des collissions possible sur le prefixe de courriel ( a@domaine1 != a@domaine2 )
     
    6466    curl -H "Authorization: token $GITEA_TOKEN" \
    6567            -X POST \
    66             --data "username=${email/@/.}&email=$email&password=$password" \
     68            --data "username=$username_2&email=$email&password=$password" \
    6769            $GITEA_HOST/api/v1/admin/users
    6870
     
    7476                -X PUT \
    7577                $GITEA_HOST/api/v1/teams/${orga[2]}/members/$username
     78        curl -H "Authorization: token $GITEA_TOKEN" \
     79                -X PUT \
     80                $GITEA_HOST/api/v1/teams/${orga[2]}/members/$username_2
    7681    done
    7782
Note: See TracChangeset for help on using the changeset viewer.