CivicActions / fema-grants

FEMA SF-425 Working Prototype
GNU General Public License v2.0
1 stars 3 forks source link

Sample content and users #39

Closed kevwalsh closed 6 years ago

kevwalsh commented 6 years ago

https://docs.google.com/spreadsheets/d/1r3tYeRcppCE1oIhKNepCf2D3xVJBvJrCF1c8y0RnWjs/edit#gid=365467024

bobschmitt-civicactions commented 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```
grugnog commented 6 years ago

@bobschmitt-civicactions I should be able to easily add this to the build

bobschmitt-civicactions commented 6 years ago

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...

kevwalsh commented 6 years ago

i just ran these locally and they work well.

bobschmitt-civicactions commented 6 years ago

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...)

bobschmitt-civicactions commented 6 years ago

Either way, this ticket is blocked until the Reports and Grants content types are committed and merged.

bobschmitt-civicactions commented 6 years ago

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

bobschmitt-civicactions commented 6 years ago

#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
grugnog commented 6 years ago

Adding the user script to the build

bobschmitt-civicactions commented 6 years ago

fema.sql.gz

DB with Basic content, users, Grants and a report

bobschmitt-civicactions commented 6 years ago

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