Merge pull request #3716 from overleaf/ta-tried-to-confirm-saml

Show Descriptive Error Mesage When Trying To Confirm SAML Email

GitOrigin-RevId: bb816d3774c18f2952851affb1f8d7c174570ba1
This commit is contained in:
Alexandre Bourdin 2021-03-10 10:11:33 +01:00 committed by Copybot
parent 6e35561aeb
commit 8001e55b88
3 changed files with 5 additions and 1 deletions

View file

@ -215,7 +215,8 @@ include ../../_mixins/reconfirm_affiliation
|
| #{translate('resending_confirmation_email')}…
div(ng-if="!userEmail.confirmationInflight && userEmail.error" aria-live="polite")
| #{translate('generic_something_went_wrong')}
span(ng-if="userEmail.errorMessage") {{ userEmail.errorMessage }}
span(ng-if="!userEmail.errorMessage") #{translate('generic_something_went_wrong')}
ui.list-unstyled(ng-controller="UserAffiliationsReconfirmController")
li.notification-entry(

View file

@ -104,6 +104,7 @@ App.controller('EmailNotificationController', function(
$scope.resendConfirmationEmail = function(userEmail) {
userEmail.confirmationInflight = true
userEmail.error = false
userEmail.errorMessage = null
UserAffiliationsDataService.resendConfirmationEmail(userEmail.email)
.then(() => {
userEmail.hide = true
@ -111,6 +112,7 @@ App.controller('EmailNotificationController', function(
})
.catch(error => {
userEmail.error = true
userEmail.errorMessage = error.data.message
console.error(error)
$scope.$emit('project-list:notifications-received')
})

View file

@ -168,6 +168,7 @@
"institution_account_tried_to_add_not_affiliated": "This email is <b>already associated</b> with your account but not affiliated with this institution.",
"institution_account_tried_to_add_affiliated_with_another_institution": "This email is <b>already associated</b> with your account but affiliated with another institution.",
"institution_acct_successfully_linked": "Your <b>__appName__</b> account was successfully linked to your <b>__institutionName__</b> institutional account.",
"institution_account_tried_to_confirm_saml": "This email cannot be confirmed. Please remove the email from your account and try adding it again.",
"institution_email_new_to_app": "Your <b>__institutionName__</b> email (<b>__email__</b>) is new to __appName__.",
"institutional": "Institutional",
"doing_this_allow_log_in_through_institution": "Doing this will allow you to log in to <b>__appName__</b> through your institution portal.",