navidrome/ui/src/user
Deluan Quintão e80a7937e8
fix(ui): make self-service profile edits report their outcome (#5699)
* fix(ui): make self-service profile edits report their outcome

When a non-admin user saved their own profile (e.g. changing their
password via EnableUserEditing), the data provider followed the user
update with a call to the admin-only PUT /api/user/{id}/library
endpoint, which always failed with 403. The save error handler then
crashed reading error.body.errors on the plain-text response, so the
user got no notification at all - while the profile change had in fact
already been applied. This made password changes look like they were
silently ignored, and follow-up attempts failed with 'password does not
match' since the current password had already changed. Present since
the multi-library support introduced in v0.58.0 (#4181).

Only call the user-library association endpoint when the logged-in user
is an admin (the server manages assignments for self-edits), and make
the save error handler tolerate error bodies without field errors,
notifying a generic error instead of crashing.

* fix(ui): tolerate nullish rejection values in user save handler

Address review feedback: use optional chaining on the error itself in
the UserEdit save handler, so a nullish rejection value also results in
the generic error notification instead of a TypeError.
2026-07-01 21:31:29 -04:00
..
DeleteUserButton.jsx fix(ui): update artist link rendering and improve button styles 2025-05-23 17:42:19 -04:00
index.js Show Person icon for non admin users 2021-04-29 18:26:53 -04:00
LibrarySelectionField.jsx feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
LibrarySelectionField.test.jsx feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
UserCreate.jsx feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
UserEdit.jsx fix(ui): make self-service profile edits report their outcome (#5699) 2026-07-01 21:31:29 -04:00
UserEdit.test.jsx fix(ui): make self-service profile edits report their outcome (#5699) 2026-07-01 21:31:29 -04:00
UserList.jsx feat(ui): show user's lastAccess (#3342) 2024-09-30 20:46:10 -04:00
userValidation.js feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
userValidation.test.js feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00