Skip to content

feat(accounts): a password change card that continues the sign-in - #722

Merged
catborise merged 2 commits into
masterfrom
first-password
Nov 23, 2026
Merged

catborise merged 2 commits into
masterfrom
first-password

Conversation

@catborise

Copy link
Copy Markdown
Owner

The forced first-login password change (and the one chosen from the profile) as a card like the sign-in page.

  • First login: "Set your own password", "Signed in as admin with a temporary password. Replace it to continue.", the first field named Temporary password ("The one you just signed in with."), no menu (every link led back to the form) but a Log out link, Save and continue.
  • Rules: a list under the two new entries ticks what the browser can check (8 characters or more, not only digits, both entries match) and says the rest (not like your name or e-mail, not a common password) is checked on save. The server's refusals appear in that list instead of under the confirmation field. The eye button shows both new entries.
  • Chosen change (Profile): the same card, with the menu, Current password and Cancel.
  • base.html gets a navbar block; static/js/password_change.js (CSP: no inline script). Turkish and Chinese texts.
  • Separate commit: test_the_first_login_password_change deleted the checkout's real data/admin_password (it ran the last forced change with the real BASE_DIR); it now uses a temporary BASE_DIR.

Checked at 1440 px and on a 390 px phone, in English, Turkish and Chinese, empty, while typing and after a refusal. Full suite: 3017 tests OK (50 skipped); ruff clean; tr/zh catalogs complete.

…n password file

test_the_first_login_password_change made the last forced password
change with the real BASE_DIR, so the view deleted data/admin_password
of the checkout the tests ran in. It now runs under a temporary
BASE_DIR, as the other first-login tests do.
The forced first-login change was a plain settings form under a menu
whose every link led back to it, asked for an "Old password" the user
did not know was the temporary one, and listed Django's four rules as
long sentences, with their refusals under the confirmation field.

The page is now a card like the sign-in page: "Set your own password",
signed in as whom and why, the temporary password named as such, and no
menu but a Log out link. A rule list under the two new entries ticks
what the browser can check (8 characters, not only digits, both entries
match) and says the rest is checked on save; the server's refusals
join that list. The eye button shows both new entries. A change chosen
from the profile uses the same card with the menu and a Cancel link.
base.html gets a navbar block for it. Turkish and Chinese texts.
@catborise
catborise merged commit 072e89f into master Nov 23, 2026
12 checks passed
@catborise
catborise deleted the first-password branch November 23, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant