feat(auth, profiles, club_memberships): enhance password reset and club admin management
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 23s

- Integrated a new password reset mechanism for user accounts, allowing admins to send reset links via email.
- Updated the management password reset functionality to differentiate between direct password setting and email link requests.
- Added validation to ensure at least one active club admin remains when modifying club member roles.
- Improved the user interface for password management in the admin panel, providing clearer feedback and options for password resets.
This commit is contained in:
Lars committed 2026-05-09 10:32:33 +02:00
1 parent f54372d7b5
commit 624c19dcba
6 files changed
+316 -78

No files matched your search

+10 -3
View File
@@ -139,11 +139,18 @@ export async function updateProfile(profileId, data) {
})
}
/** Neues Login-Passwort für anderes Profil (Super-/Portal- oder Vereinsadmin). */
export async function managementPasswordReset(profileId, newPassword) {
/**
* Passwort anderer Konten: Standard leerer Body → E-Mail mit Reset-Link (wie Passwort vergessen).
* Nur Super-Admins dürfen `newPassword` setzen (direktes Überschreiben des Passwort-Hashes).
*/
export async function managementPasswordReset(profileId, newPassword = null) {
const body = {}
if (newPassword != null && String(newPassword).trim() !== '') {
body.new_password = newPassword
}
return request(`/api/profiles/${profileId}/management-password-reset`, {
method: 'POST',
body: JSON.stringify({ new_password: newPassword }),
body: JSON.stringify(body),
})
}