Explorar o código

Merge pull request #15405 from overleaf/msm-remove-redundant-check

[web] Remove redundant check

GitOrigin-RevId: 035adf436c0d694fcb7817cd27e743683eb1252d
Miguel Serrano %!s(int64=3) %!d(string=hai) anos
pai
achega
93b7e65f6c
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      services/web/app/src/Features/User/SAMLIdentityManager.js

+ 1 - 3
services/web/app/src/Features/User/SAMLIdentityManager.js

@@ -157,9 +157,7 @@ async function _addInstitutionEmail(userId, email, providerId, auditLog) {
     throw new Errors.NotFoundError('user not found')
   }
   const emailAlreadyAssociated = user.emails.find(e => e.email === email)
-  if (emailAlreadyAssociated && emailAlreadyAssociated.confirmedAt) {
-    await UserUpdater.promises.updateUser(query, update)
-  } else if (emailAlreadyAssociated) {
+  if (emailAlreadyAssociated) {
     await UserUpdater.promises.updateUser(query, update)
   } else {
     await UserUpdater.promises.addEmailAddress(