diff --git a/services/web/app/src/Features/Errors/Errors.js b/services/web/app/src/Features/Errors/Errors.js index 4cdb6e9a4a..175d0af16e 100644 --- a/services/web/app/src/Features/Errors/Errors.js +++ b/services/web/app/src/Features/Errors/Errors.js @@ -136,6 +136,12 @@ class SAMLGroupSSOLoginIdentityMismatchError extends SAMLAuthenticationError { } } +class SAMLGroupSSOLoginRequestedEmailNotConfirmed extends SAMLAuthenticationError { + get i18nKey() { + return 'saml_login_requested_email_not_confirmed_error' + } +} + class SAMLGroupSSOLoginIdentityNotFoundError extends SAMLAuthenticationError { get i18nKey() { return 'saml_login_identity_not_found_error' @@ -391,6 +397,7 @@ module.exports = { SAMLGroupSSOLoginIdentityMismatchError, SAMLGroupSSOLoginIdentityNotFoundError, SAMLGroupSSODisabledError, + SAMLGroupSSOLoginRequestedEmailNotConfirmed, SAMLInvalidUserAttributeError, SAMLInvalidUserIdentifierError, SAMLInvalidSignatureError, diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 3d6fbf66d5..e4daffbe4c 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -2014,6 +2014,7 @@ "saml_login_failure": "Sorry, there was a problem logging you in. Please contact your administrator for more information.", "saml_login_identity_mismatch_error": "Sorry, you are trying to log in to Overleaf as __email__ but the identity returned by your identity provider is not the correct one for this Overleaf account.", "saml_login_identity_not_found_error": "Sorry, we were not able to find an Overleaf account set up for single sign-on with this identity provider.", + "saml_login_requested_email_not_confirmed_error": "Sorry, the email address you requested to use for login has not been confirmed and we cannot complete your SSO log in request. If you have another method to log in please log in and then confirm your email. Please <0>contact us if you need assistance.", "saml_metadata": "Overleaf SAML Metadata", "saml_missing_signature_error": "Sorry, the information received from your identity provider is not signed (both response and assertion signatures are required). Please contact your administrator for more information.", "saml_missing_user_attribute": "There was a problem with your Single Sign-on authentication. Your organization did not provide the required information to complete authentication. Please contact your administrator for more information.", diff --git a/services/web/test/acceptance/src/helpers/groupSSO.mjs b/services/web/test/acceptance/src/helpers/groupSSO.mjs index 77cee522de..3a58c18a26 100644 --- a/services/web/test/acceptance/src/helpers/groupSSO.mjs +++ b/services/web/test/acceptance/src/helpers/groupSSO.mjs @@ -42,7 +42,7 @@ export async function createGroupSSO( const nonSSOMember = nonSSOMemberHelper.user const groupAdminUser = new User() - const memberUser = new User() + const memberUser = new User({ confirmedAt: new Date() }) await groupAdminUser.ensureUserExists() await memberUser.ensureUserExists()