Merge pull request #2678 from overleaf/jel-unreliable-sso-email

Use SSO email attribute flag from API instead of settings file

GitOrigin-RevId: 088b4247a0cbd56ff2184ac6d280e427cea3972e
This commit is contained in:
nate stemen 2020-03-18 10:27:42 -04:00 committed by Copybot
parent 31b95e8617
commit bffb9f3bce

View file

@ -74,7 +74,6 @@ class SAMLSessionDataMissing extends BackwardCompatibleError {
? arg.samlSession ? arg.samlSession
: {} : {}
this.tryAgain = true this.tryAgain = true
const institutionsWithoutEmail = settings.samlInstitutionsWithoutEmail || []
const { const {
universityId, universityId,
universityName, universityName,
@ -91,7 +90,8 @@ class SAMLSessionDataMissing extends BackwardCompatibleError {
this.message = 'Missing session data.' this.message = 'Missing session data.'
} else if ( } else if (
!institutionEmail && !institutionEmail &&
institutionsWithoutEmail.includes(samlSession.universityId) samlSession &&
samlSession.userEmailAttributeUnreliable
) { ) {
this.tryAgain = false this.tryAgain = false
this.message = `Your account settings at your institution prevent us from accessing your email. You will need to make your email public at your institution in order to link with ${ this.message = `Your account settings at your institution prevent us from accessing your email. You will need to make your email public at your institution in order to link with ${