Created
March 8, 2023 18:14
-
-
Save kat-perreira/d49ae9451f897a15bc64d53e336c213e to your computer and use it in GitHub Desktop.
To paste in a REPL like repl.it to create `n` users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for users | |
const createBulkUsers = (numberOfUsers) => { | |
// skip validation is true | |
for (let i = 0; i < numberOfUsers; i++) { | |
console.log(`user:create_employee[highspot.com, user${i}@highspot.com, abc123!, user${i}, surname, true]`); | |
} | |
} | |
// for emails to feed to people picker to assign as admin roles, add to spot as spot owners, ect | |
const createEmailList = (numberOfUsers) => { | |
// skip validation true | |
for (let i = 0; i < numberOfUsers; i++) { | |
console.log(`user${i}@highspot.com, `); | |
} | |
} | |
/* | |
There’s prob a less jenky way to do this but I don’t feel like messing around in Bash and this worked so whatever. | |
Steps to 1000 instructors: | |
* Copy/past gist into a REPL (I used repl.it) | |
* Entered 1000 as parameter into createBulkUsers function and called it but can enter as many as you want. Increase iteration start point if you want to add more again cause it won’t allow duplicate emails | |
* copy/pasted the console output to admin tasks (careful at end of copy, there is some additional repl.it words) | |
* Entered 1000 as parameter into the createEmailList function and called it | |
* copy/pasted in company settings, add admin people picker (again, be mindful of end of that) | |
* copy/pasted it into spot settings of spot I wanted to make for everyone to be instructors to, added them as co-owners | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment