feat(cabana): add the My account page with subtitle and password change
- lagoon: 202610090001_backend_users_metadata adds WinterCMS's nullable jsonable backend_users.metadata column (TEXT); rollback drops only it - cabana.BackendUser.Metadata and Subtitle read metadata.subtitle leniently (NULL, blank, null, [], invalid JSON and non-strings read as empty) - GET /auth/me returns subtitle; PUT /account edits the signed-in admin's own names, email and subtitle, and the password with current_password; any other key is a 422 and nothing is written - email: required, valid, 6-255 chars, unique against other admins' email and login ignoring case (soft-deleted included); a unique-index race is 422 - a password change sets tokens_valid_after, revokes the presented token and gives a cookie session a fresh cookie - swag annotation, regenerated admin.json and schema.d.ts; route inventories, CSRF walk (27) and OpenAPI conformance learn the route - SPA: My account item in the user menu opens /account (AccountView), which saves through PUT /account and updates the top bar via setCurrentUser - backend::lang.myaccount strings (en, pl), rebuilt boardwalk dist - cabana and lagoon READMEs, users-and-permissions and admin-spa docs
This commit is contained in:
@@ -229,3 +229,22 @@ permissioneditor:
|
||||
locked: You cannot change this permission.
|
||||
empty: No permissions are defined yet.
|
||||
other: Other
|
||||
myaccount:
|
||||
menu_label: My account
|
||||
menu_description: Edit your name, email, subtitle and password.
|
||||
profile: Profile
|
||||
login: Login
|
||||
first_name: First name
|
||||
last_name: Last name
|
||||
email: Email
|
||||
subtitle: Subtitle
|
||||
subtitle_comment: A short line shown under your name, for example your role or position.
|
||||
password_section: Change password
|
||||
password_comment: Leave blank to keep the current password.
|
||||
current_password: Current password
|
||||
password: New password
|
||||
password_confirmation: Confirm new password
|
||||
current_password_invalid: The current password is incorrect.
|
||||
field_not_editable: This field cannot be changed on My account.
|
||||
subtitle_unavailable: The subtitle cannot be saved because the stored profile metadata is not a JSON object.
|
||||
saved: Account saved
|
||||
|
||||
@@ -251,3 +251,22 @@ permissioneditor:
|
||||
locked: Nie możesz zmienić tego uprawnienia.
|
||||
empty: Nie zdefiniowano jeszcze żadnych uprawnień.
|
||||
other: Inne
|
||||
myaccount:
|
||||
menu_label: Moje konto
|
||||
menu_description: Zmień imię, nazwisko, e-mail, podtytuł i hasło.
|
||||
profile: Profil
|
||||
login: Login
|
||||
first_name: Imię
|
||||
last_name: Nazwisko
|
||||
email: E-mail
|
||||
subtitle: Podtytuł
|
||||
subtitle_comment: Krótki opis pod Twoim imieniem, na przykład rola lub stanowisko.
|
||||
password_section: Zmiana hasła
|
||||
password_comment: Pozostaw puste, aby zachować obecne hasło.
|
||||
current_password: Obecne hasło
|
||||
password: Nowe hasło
|
||||
password_confirmation: Powtórz nowe hasło
|
||||
current_password_invalid: Obecne hasło jest nieprawidłowe.
|
||||
field_not_editable: Tego pola nie można zmienić w ustawieniach konta.
|
||||
subtitle_unavailable: Nie można zapisać podtytułu, ponieważ zapisane metadane profilu nie są obiektem JSON.
|
||||
saved: Zapisano konto
|
||||
|
||||
Reference in New Issue
Block a user