set entitlement to false on reg if none

GitOrigin-RevId: 039189699f78cbaa5917cfadb7d3bedd599c6396
This commit is contained in:
Ersun Warncke 2020-03-31 06:04:25 -04:00 committed by Copybot
parent 4a1ac4649c
commit 50d715ea5d

View file

@ -171,6 +171,8 @@ async function linkAccounts(
// update v1 affiliations record
if (hasEntitlement) {
await InstitutionsAPI.promises.addEntitlement(userId, institutionEmail)
} else {
await InstitutionsAPI.promises.removeEntitlement(userId, institutionEmail)
}
}