medic / cht-user-management

GNU Affero General Public License v3.0
3 stars 1 forks source link

Script to create user manager accounts for CHIS KE #80

Closed kennsippell closed 6 months ago

kennsippell commented 7 months ago

79

Intended use for this script is to create { 25 users * 47 instances } = 1175 user manager accounts in CHIS KE production.

This script creates a user with role: user_manager within a given instance's county. For Siaya/Migori it supports county disambiguation. Check out README.md or run npx ts-node scripts/create-user-managers/index.ts --help to understand its use.

This is positioned well to support Uganda, but will require further updates once this request has been fulfilled and requirements are more clear.

I've used base branches from https://github.com/medic/cht-user-management/pull/58 and https://github.com/medic/cht-user-management/pull/75 to avoid a tricky merge down the line. So will need one of those to merge before I send this for review. For the curious, all content for this PR is in scripts/create-user-managers and package.json.

kennsippell commented 6 months ago

Hey @paulpascal, This script isn't perfect but this is what I used to creation a few hundred user managers for eCHIS Kenya. I think it's worth reviewing and committing now and we can continue to iterate on it through issues and new PRs. Can you take a look when you have time?

paulpascal commented 6 months ago

For Sure @kennsippell

kennsippell commented 6 months ago

@paulpascal Yes!! Definitely. lol. It was a large pain actually...