LoveJustice / tinyhands

Searchlight - Human Trafficking Data Center
6 stars 0 forks source link

Expansion Country Permission Creation #372

Open amunn33 opened 6 years ago

amunn33 commented 6 years ago

Goal

Create tables for new permission settings that will be used for country expansion.

Details

Questions

Table Examples

Permission

id Group Action
1 IRF View
2 IRF Add
4 IRF Delete
5 IRF Approve
10 Budget Add
14 Alert Investigations
20 Account View
21 Account Manage

Country

id Name
2 Nepal
3 South Africa
4 Bangladesh
5 Thailand

Station

id country_id Name
1 2 Bhadrapur
27 3 Johannesburg

User

id Name
1 Austin (Super User)
2 Ashish (Nepal Data Entry)
14 Phil (Accountant)
25 Bhadrapur Station
30 Anil (Investigator)
33 Kirk (Asia Transit Monitoring Director)
37 Bob (South Africa techie)

User Location Permission

user_id country_id station_id permission_id description
1 null null 1 Austin can view all IRFs
1 null null 4 Austin can delete all IRFs
2 2 null 5 Ashish can approve all Nepali IRFs
2 3 null 1 Ashish can view all SA IRFs
14 null null 10 Phil can add budgets for all countries
25 null 1 2 Bhadrapur staff account can add Bhadrapur IRFs
25 2 null 1 Bhadrapur staff account can view all Nepal IRFs
30 2 null 14 Anil receives investigation alerts for Nepal
33 2 null 1 Kirk can view Nepal IRFs
33 4 null 1 Kirk can view Bangladesh IRFs
33 5 null 1 Kirk can view Thailand IRFs
33 2 null 20 Kirk can view Nepal accounts
33 4 null 20 Kirk can view Bangladesh accounts
33 5 null 20 Kirk can view Thailand accounts
37 3 null 21 Bob can manage South Africa accounts
amunn33 commented 6 years ago

@scrishel How does this look?

scrishel commented 6 years ago

Expansion Permission Server.pdf

amunn33 commented 6 years ago

Thanks for writing this up.