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

fix(admin): restore current password input on profile page #18789

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

remidej
Copy link
Contributor

@remidej remidej commented Nov 14, 2023

What does it do?

Changes on the profile page:

  • restores the current password input, as it it needed by the backend to change password
  • avoids passing an empty password string if the user didn't touch the password input. This is what prevented users from saving

Why is it needed?

To allow users to save their changes on the profile page.

How to test it?

Go to the profile page, make changes (both with and without password changes), then try to save.

Related issue(s)/PR(s)

fixes #18678

Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

So a user needs to pass their current password to change their password?

IMO we should add a unit test for this, because it was very unclear why we had the "current password" field 🙂

packages/core/admin/admin/src/pages/ProfilePage.tsx Outdated Show resolved Hide resolved
@remidej
Copy link
Contributor Author

remidej commented Nov 14, 2023

So a user needs to pass their current password to change their password?

@joshuaellis yes it is, because it's different from the password recovery feature which works via an email

@joshuaellis
Copy link
Member

Do you think we could get the types to represent this? i.e if password is present in the object then current password is not optional... just wondering more solutions to tighten this up for the future.

@joshuaellis joshuaellis added source: core:admin Source is core/admin package pr: fix This PR is fixing a bug labels Nov 14, 2023
@joshuaellis joshuaellis added this to the 4.15.5 milestone Nov 14, 2023
@joshuaellis joshuaellis linked an issue Nov 14, 2023 that may be closed by this pull request
@remidej remidej assigned alexandrebodin and unassigned remidej Nov 14, 2023
@alexandrebodin alexandrebodin merged commit 121dd75 into releases/4.15.5 Nov 14, 2023
21 checks passed
@alexandrebodin alexandrebodin deleted the fix/profile-page branch November 14, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:admin Source is core/admin package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't save profile page changes
3 participants