Closed kevwalsh closed 6 years ago
Based on the table above, these drush steps should create the relevant users/roles. I'm not sure how to add them to a batch script to populate the sandbox dbs though...
Create admin users:
drush user-create Mary.Analyst --mail="analyst@example.com" --password="civicactions"
drush urol analyst Mary.Analyst
drush user-create Jackson.Specialist --mail="jackson@example.com" --password="civicactions"
drush user-create Celeste.Aspecialist --mail="celeste@example.com" --password="civicactions"
drush urol specialist Jackson.Specialist,Celeste.Aspecialist
Create grantee users:
drush user-create Marcos.Fletcher --mail Marcos.Fletcher@example.com --password=civicactions
drush user-create Shannon.Blair --mail Shannon.Blair@example.com --password=civicactions
drush user-create Amy.Fleming --mail Amy.Fleming@example.com --password=civicactions
drush user-create Rose.Mack --mail Rose.Mack@example.com --password=civicactions
drush user-create Colleen.Parsons --mail Colleen.Parsons@example.com --password=civicactions
drush user-create Andrea.Wells --mail Andrea.Wells@example.com --password=civicactions
drush user-create Cynthia.Tran --mail Cynthia.Tran@example.com --password=civicactions
drush user-create Darnell.Wright --mail Darnell.Wright@example.com --password=civicactions
drush user-create Pamela.Clarke --mail Pamela.Clarke@example.com --password=civicactions
drush user-create Cameron.Denton --mail Cameron.Denton@example.com --password=civicactions
drush user-create Mei.Lee --mail Mei.Lee@example.com --password=civicactions
drush user-create Sage.Anthony --mail Sage.Anthony@example.com --password=civicactions
drush user-create Jillian.Doll --mail Jillian.Doll@example.com --password=civicactions
drush user-create Roxanna.Kozlowski --mail Roxanna.Kozlowski@example.com --password=civicactions
drush user-create Providencia.Camp --mail Providencia.Camp@example.com --password=civicactions
drush user-create Shan.Vanover --mail Shan.Vanover@example.com --password=civicactions
drush user-create Tessie.Oswald --mail Tessie.Oswald@example.com --password=civicactions
drush user-create Michel.Villanueva --mail Michel.Villanueva@example.com --password=civicactions
drush user-create Annice.Shackelford --mail Annice.Shackelford@example.com --password=civicactions```
Create roles for these users:
```drush urol grantee Gerald.Rhodes,Marcos.Fletcher,Shannon.Blair,Amy.Fleming,Rose.Mack,Colleen.Parsons,Andrea.Wells,Cynthia.Tran,Darnell.Wright,Pamela.Clarke,Cameron.Denton,Mei.Lee,Sage.Anthony,Jillian.Doll,Roxanna.Kozlowski,Providencia.Camp,Shan.Vanover,Tessie.Oswald,Michel.Villanueva,Annice.Shackelford```
@bobschmitt-civicactions I should be able to easily add this to the build
Cool. Once we define our reports content type, we should be able to add test content as well.
We may have to add a "Grant" content type to provide a lookup table for the Reports though...
i just ran these locally and they work well.
I think we can either a) use drush to export/import nodes then create a script to import them or b) create a populated "testing" db, dump it, create a bowline script to import it as needed in the sandboxes.
They're probably both the same amount of work, but I can do b) all the way, but will need help with a). (But maybe all I need do is create a bowline script that does the drush imports....hmmmm...)
Either way, this ticket is blocked until the Reports and Grants content types are committed and merged.
I'm not seeing an easy way to create content via drush script. I'm going to pursue creating dummy content in a db and then creating a test
db import function
#Add admin users/ roles
drush user-create Mary.Analyst --mail="analyst@example.com" --password="civicactions"
drush urol analyst Mary.Analyst
drush user-create Jackson.Specialist --mail="jackson@example.com" --password="civicactions"
drush user-create Celeste.Aspecialist --mail="celeste@example.com" --password="civicactions"
drush urol specialist Jackson.Specialist,Celeste.Aspecialist
#Add grantee users
drush user-create Marcos.Fletcher --mail Marcos.Fletcher@example.com --password=civicactions
drush user-create Shannon.Blair --mail Shannon.Blair@example.com --password=civicactions
drush user-create Amy.Fleming --mail Amy.Fleming@example.com --password=civicactions
drush user-create Rose.Mack --mail Rose.Mack@example.com --password=civicactions
drush user-create Colleen.Parsons --mail Colleen.Parsons@example.com --password=civicactions
drush user-create Andrea.Wells --mail Andrea.Wells@example.com --password=civicactions
drush user-create Cynthia.Tran --mail Cynthia.Tran@example.com --password=civicactions
drush user-create Darnell.Wright --mail Darnell.Wright@example.com --password=civicactions
drush user-create Pamela.Clarke --mail Pamela.Clarke@example.com --password=civicactions
drush user-create Cameron.Denton --mail Cameron.Denton@example.com --password=civicactions
drush user-create Mei.Lee --mail Mei.Lee@example.com --password=civicactions
drush user-create Sage.Anthony --mail Sage.Anthony@example.com --password=civicactions
drush user-create Jillian.Doll --mail Jillian.Doll@example.com --password=civicactions
drush user-create Roxanna.Kozlowski --mail Roxanna.Kozlowski@example.com --password=civicactions
drush user-create Providencia.Camp --mail Providencia.Camp@example.com --password=civicactions
drush user-create Shan.Vanover --mail Shan.Vanover@example.com --password=civicactions
drush user-create Tessie.Oswald --mail Tessie.Oswald@example.com --password=civicactions
drush user-create Michel.Villanueva --mail Michel.Villanueva@example.com --password=civicactions
drush user-create Annice.Shackelford --mail Annice.Shackelford@example.com --password=civicactions
#add grantee roles
drush urol grantee Marcos.Fletcher,Shannon.Blair,Amy.Fleming,Rose.Mack,Colleen.Parsons,Andrea.Wells,Cynthia.Tran,Darnell.Wright,Pamela.Clarke,Cameron.Denton,Mei.Lee,Sage.Anthony,Jillian.Doll,Roxanna.Kozlowski,Providencia.Camp,Shan.Vanover,Tessie.Oswald,Michel.Villanueva,Annice.Shackelford
Adding the user script to the build
DB with Basic content, users, Grants and a report
User roles aren't being imported on build @grugnog, and we'll need to add a user unblock command to activate the imported users:
drush user-unblock Mary.Analyst,Jackson.Specialist,Celeste.Aspecialist,Marcos.Fletcher,Shannon.Blair,Amy.Fleming,Rose.Mack,Colleen.Parsons,Andrea.Wells,Cynthia.Tran,Darnell.Wright,Pamela.Clarke,Cameron.Denton,Mei.Lee,Sage.Anthony,Jillian.Doll,Roxanna.Kozlowski,Providencia.Camp,Shan.Vanover,Tessie.Oswald,Michel.Villanueva,Annice.Shackelford
https://docs.google.com/spreadsheets/d/1r3tYeRcppCE1oIhKNepCf2D3xVJBvJrCF1c8y0RnWjs/edit#gid=365467024