From 50d715ea5d931dd0c38c71ea90f1a0ca9b67094b Mon Sep 17 00:00:00 2001 From: Ersun Warncke Date: Tue, 31 Mar 2020 06:04:25 -0400 Subject: [PATCH] set entitlement to false on reg if none GitOrigin-RevId: 039189699f78cbaa5917cfadb7d3bedd599c6396 --- services/web/app/src/Features/User/SAMLIdentityManager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/app/src/Features/User/SAMLIdentityManager.js b/services/web/app/src/Features/User/SAMLIdentityManager.js index 66abce16f1..639aa392d7 100644 --- a/services/web/app/src/Features/User/SAMLIdentityManager.js +++ b/services/web/app/src/Features/User/SAMLIdentityManager.js @@ -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) } }