Merge pull request #2350 from overleaf/jel-institution-notifications

Non canonical notification when initiated at institution

GitOrigin-RevId: 486f740bf6f71012d479c69176efbf28d6883b8d
This commit is contained in:
Jessica Lawshe
2019-11-13 14:39:47 +00:00
committed by sharelatex
parent af63c8de97
commit 7ad4b2cfc3
3 changed files with 35 additions and 2 deletions
@@ -497,7 +497,11 @@ const ProjectController = {
// Notification: After SSO Linked or Logging in
// The requested email does not match primary email returned from
// the institution
if (samlSession.emailNonCanonical && !samlSession.linkedToAnother) {
if (
samlSession.requestedEmail &&
samlSession.emailNonCanonical &&
!samlSession.linkedToAnother
) {
notificationsInstitution.push({
institutionEmail: samlSession.emailNonCanonical,
requestedEmail: samlSession.requestedEmail,