Merge pull request #2250 from overleaf/jel-saml-session-email

Non canonical institution email in session

GitOrigin-RevId: b70971f6f42391391a42ba6ff214c14a275461d3
This commit is contained in:
Jessica Lawshe 2019-10-17 10:30:37 -05:00 committed by sharelatex
parent 93c0180d31
commit 34c04660a6
2 changed files with 7 additions and 2 deletions

View file

@ -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)

View file

@ -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")