Skip to content
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

Improve handling for changing email of invited users #22644

Open
wants to merge 4 commits into
base: 5.x-dev
Choose a base branch
from

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Oct 7, 2024

Description:

Matomo has the possibility to invite new users. When a user is invited an email with an activation link will be sent to their email address.

The details of a user, who has not yet confirmed their invitation, can already be changed by the super user. This also includes the initially set email address.

This PR improves the handling if the email address of an invited user is changed.

When this happens, the previous invitation link will be invalidated and a fresh invitation will be sent to the new email address.

Review

@sgiehl sgiehl added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Oct 7, 2024
@sgiehl sgiehl added this to the 5.2.0 milestone Oct 7, 2024
@sgiehl sgiehl marked this pull request as ready for review October 7, 2024 14:21
@sgiehl sgiehl requested a review from a team October 7, 2024 14:21
@sgiehl sgiehl added the Needs Review PRs that need a code review label Oct 7, 2024
@michalkleiner michalkleiner self-assigned this Oct 9, 2024
@michalkleiner
Copy link
Contributor

The mechanism works as expected. I'm not 100% sure on the wording of the notification as it looks like we are cautioning against something that may not even happen. I was actually expecting to have a confirmation dialog explaining the mechanism only when the email was changed, asking whether the superadmin wanted to continue. We might be alarming too many people as it is now. It's just my perception, should we consult this with product? Or merge it as is and do a follow up ticket that we will never get to?

@sgiehl
Copy link
Member Author

sgiehl commented Oct 9, 2024

@michalkleiner I initially tried to extend the password confirmation to add the text in case the email was changed. But due to the way how the vue code is designed this is not fully possible. If you e.g. add a char and remove it again, that can't be detected.
But having more thoughts on that right now: Actually there isn't anything else than the email you can change for an invited user, as the password can't be set in that case. So guess we could simply always show the additional info in the confirmation for invited users. I'll try to change that quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants