Open nitinsubz opened 3 years ago
Merging #276 (46ed7af) into master (2a8785b) will increase coverage by
1.59%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #276 +/- ##
==========================================
+ Coverage 89.77% 91.37% +1.59%
==========================================
Files 9 10 +1
Lines 313 371 +58
Branches 22 24 +2
==========================================
+ Hits 281 339 +58
Misses 32 32
Impacted Files | Coverage Δ | |
---|---|---|
common/model/domain.js | 100.00% <100.00%> (ø) |
|
common/test_helpers/firestore.mock.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 2a8785b...46ed7af. Read the comment docs.
This PR implements Crowd automatic linking with the CLAM.
Here is how it's structured:
A list of approved domains is maintained in a new tab of the admin tools at endpoint /admin/manage-domains
Every time a user links their ONF account, a function is run to check if their email domain is in the list of approved domains. If it is, they are automatically added to the crowd group through a firebase cloud function.
Every time a user UNlinks their ONF account, a cloud function is run to check if they are in the crowd group. If they are, they are removed from the crowd group.
If a domain is removed from the admin list, then a cloud function is run to remove all crowd users under that domain. The inverse happens when a domain is added to the admin list.
Fixes #275