diff --git a/services/web/app/src/Features/User/UserPagesController.js b/services/web/app/src/Features/User/UserPagesController.js index 483c943490..95c13e3a48 100644 --- a/services/web/app/src/Features/User/UserPagesController.js +++ b/services/web/app/src/Features/User/UserPagesController.js @@ -117,6 +117,10 @@ const UserPagesController = { // Institution SSO const institutionLinked = _.get(req.session, ['saml', 'linked']) const institutionNotLinked = _.get(req.session, ['saml', 'notLinked']) + const institutionEmailNonCanonical = _.get(req.session, [ + 'saml', + 'emailNonCanonical' + ]) delete req.session.saml logger.log({ user: userId }, 'loading settings page') let shouldAllowEditingDetails = true @@ -146,6 +150,7 @@ const UserPagesController = { oauthUseV2: Settings.oauthUseV2 || false, institutionLinked, institutionNotLinked, + institutionEmailNonCanonical, samlBeta: req.session.samlBeta, ssoError: ssoError, thirdPartyIds: UserPagesController._restructureThirdPartyIds(user) diff --git a/services/web/app/views/user/settings/user-affiliations.pug b/services/web/app/views/user/settings/user-affiliations.pug index d01695e51c..b0b56e190f 100644 --- a/services/web/app/views/user/settings/user-affiliations.pug +++ b/services/web/app/views/user/settings/user-affiliations.pug @@ -223,7 +223,7 @@ form.row( .small !{translate("institution_acct_successfully_linked", {institutionName: institutionLinked.universityName})} if institutionLinked.hasEntitlement .small !{translate("this_grants_access_to_features", {featureType: translate("professional")})} - if institutionLinked.emailViaInstitution + if institutionEmailNonCanonical tr.affiliations-table-warning-row(ng-if="!hideInstitutionNotifications.warning") td(colspan="3").text-center(aria-live="assertive") button.close( @@ -236,7 +236,7 @@ form.row( .small i.fa.fa-exclamation-triangle(aria-hidden="true") |   - | !{translate("in_order_to_match_institutional_metadata", {email: institutionLinked.emailViaInstitution})} + | !{translate("in_order_to_match_institutional_metadata", {email: institutionEmailNonCanonical})} if institutionNotLinked tr.affiliations-table-error-row(ng-if="!hideInstitutionNotifications.error") td(colspan="3").text-center(aria-live="assertive")