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
: {}
this.tryAgain = true
const institutionsWithoutEmail = settings.samlInstitutionsWithoutEmail || []
const {
universityId,
universityName,
@ -91,7 +90,8 @@ class SAMLSessionDataMissing extends BackwardCompatibleError {
this.message = 'Missing session data.'
} else if (
!institutionEmail &&
institutionsWithoutEmail.includes(samlSession.universityId)
samlSession &&
samlSession.userEmailAttributeUnreliable
) {
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 ${