Skip to content

Core mail migration and recover improvement#772

Closed
Daihecyy wants to merge 5 commits intomainfrom
core-mail-migration-improvement
Closed

Core mail migration and recover improvement#772
Daihecyy wants to merge 5 commits intomainfrom
core-mail-migration-improvement

Conversation

@Daihecyy
Copy link
Contributor

@Daihecyy Daihecyy commented Jul 13, 2025

Description

Changed mail migration and recover to harmonize both and to prevent duplicate tokens
⚠️ Consider changing CalypSSO mail for mail-migration-already-exist :

Oups ! L'adresse mail que tu as fournie est déjà associée à un compte @{{
_product_name }} existant. Merci de nous contacter pour résoudre ce
problème.

Which is sent to the holder of the new address (to prevent anyone from extracting emails), but doesnt make sense for him

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the documentation, if necessary

@Daihecyy Daihecyy added ready for review This PR is ready to be reviewed code quality and removed don't merge labels Jul 13, 2025
Comment on lines +684 to +688
# We need to make sur the user will keep the same school if he is not a no_school user
_, new_school_id = await get_account_type_and_school_id_from_email(
email=mail_migration.new_email,
db=db,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to change the school?


# The email column should not be unique.
# Someone can indeed create more than one password reset request,
email: Mapped[str]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing multiple request for a same user improve considerably the user experience

Comment on lines -784 to +813
return "The email address has been successfully updated"
return standard_responses.Result()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a CalypSSO page

@Daihecyy Daihecyy closed this Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality ready for review This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants