Преглед на файлове

set entitlement to false on reg if none

GitOrigin-RevId: 039189699f78cbaa5917cfadb7d3bedd599c6396
Ersun Warncke преди 6 години
родител
ревизия
50d715ea5d
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      services/web/app/src/Features/User/SAMLIdentityManager.js

+ 2 - 0
services/web/app/src/Features/User/SAMLIdentityManager.js

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