---
# System prepended metadata

title: Untitled

---

### PR

1. leon@gmail.com <--- individual account
2. abbda@servicerocket.com <--- 
3. amen@servicerocket.com <---
4. leon@servicerocket.com  <--- 
   individual subscprion at May 2020
   september added as domain users
   october 2020 remove leon as domain users
   november 2020, added as domain users

#### Authorizer
1. Check for domain-userlist on your loggin email domain
2. if you in the domain list, but not valid subscription ---> 401
3. if you in the domain list, valid subscription --> 
   principal
   ```
   id: google
   email: abba@servicerocket.com
   domain: servicerocket
   ```
4. if you not in the domain list, then you are individual
   ```
   id: google
   email: abba@servicerocket.com
   ```
----
tammy -- organization admin
-- leon@servicerocket.com
-- abba@servicerocket.com

dont want
-- amen@servicerocket.com


classroomId (if the classroom has amen, leon and abba)
--> create events

domain..u can share event data for the classroom


-----

- if you are domain, you can see all events for this class (even if some teacher are not on the domain)

- If you are individual, you can see all event for this class (created by you only)

---

#### gcat-accounts

| id         | email    |  
| --------   | -------- | 
|        1   | leon@gmail.com  |
|        2   | abba@servicerocket.com |
|        3   | amen@servicerocket.com |
|        4   | leon@servicerocket.com |

#### gcat-domain-users
| domain            | email    |  
| --------          | -------- | 
|servicerocket.com  | abbda@servicerocket.com|
|servicerocket.com  | amen@servicerocket.com |

#### gcat-events
| accountId | domain   |class   |
| --------  | -------- | -------- | 
|       1   | null     | science |
|       2   | servicerocket.com | politics
|       3   | servicerocket.com | politics
|       4   | servicerocket.com | math
|       4   | servicerocket.com | math

#### gcat-event-dates

| accountId | domain   |
| --------  | -------- | 
|   1       | null     | 
|   2       | servicerocket.com | 
|   3       | servicerocket.com | 
|   4       | servicerocket.com | 
|   4       | servicerocket.com |

#### gcat-event-attendances

| accountId  | domain   |
| --------   | -------- | 
| 1          | null     | 
| 2          | servicerocket.com | 
| 3          | servicerocket.com | 
| 4          | servicerocket.com | 
| 4          | servicerocket.com |


#### TODO
1. Import list of emails from jenkins job
2. Those newly added users
   if your account is not yet exists --> domain users table
   if your account is already exist (individual license previously) -->
   retrieve all the data that belong to your accountId & (domain is not exists), then update the domain for all the tables
