Skip to content

Fix forced-event-locale fallback #6021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

ThiefMaster
Copy link
Member

@ThiefMaster ThiefMaster commented Nov 3, 2023

Forcing the event locale without taking the session into account is done when sending emails to others, since those should pretty much never use the user's current session locale but rather the event (or server) default locale.

There's still an issue where registration notifications to an unauthenticated user will not use their locale but the default one, but this cannot be fixed without storing the locale used during registration since at the time where we send a notification we do not know if the user self-registered or it was a manager registering them, so we do not know if it's safe to take the session locale into account.

fixes #5987


TODO:

  • changelog
  • rebase onto 3.2.x after testing

@ThiefMaster
Copy link
Member Author

Updated to use the session locale unless it's a manager performing an action on behalf of the user. Of course this only works when managers do stuff in the management area and not when they use the registrant's personal link with the UUID and use "their" registration page e.g. to withdraw them or edit their registration, but if people use things the wrong way there's not much we can do.

@ThiefMaster ThiefMaster requested a review from tomasr8 November 13, 2023 11:37
@ThiefMaster ThiefMaster added this to the v3.2 milestone Nov 13, 2023
Forcing the event locale without taking the session into account is done
when sending emails to others, since those should pretty much never use
the user's current session locale but rather the event (or server)
default locale.

There's still an issue where registration notifications to an
unauthenticated user will not use their locale but the default one, but
this cannot be fixed without storing the locale used during registration
since at the time where we send a notification we do not know if the
user self-registered or it was a manager registering them, so we do not
know if it's safe to take the session locale into account.
But only when the user did an action themself, not when a manager did it
for them.
@ThiefMaster ThiefMaster changed the base branch from master to 3.2.x November 13, 2023 13:14
@ThiefMaster ThiefMaster enabled auto-merge (squash) November 13, 2023 13:15
@ThiefMaster ThiefMaster merged commit 1046cbc into indico:3.2.x Nov 13, 2023
@ThiefMaster ThiefMaster deleted the fix-locale-default branch November 13, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Registration notification email are in the user language, not the organiser language
1 participant