Registration: replace date-of-birth field with a simple 18+ confirmation #45
Reference in New Issue
Block a user
Delete Branch "agent/f4c371c981ba"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the date-of-birth field on registration with a simple 18+ confirmation checkbox. Per the roadmap note: don't collect/store an actual DOB right now.
Backend (
backend/app/routers/auth.py):RegisterRequest.date_of_birth: str->over_18: bool./registerrejectsover_18=falsewith 400, same as before.calculate_age()is kept (unused by/registernow) since real DOB collection is coming back in a future pass, and deleting it broketest_auth_age_gate.py's import for no benefit.Frontend:
DOBEditLineEdit replaced with anOver18CheckCheckBox inmain_menu.tscn/main_menu.gd.ApiClient.register()now takes a bool instead of a date string.Tests updated to match:
test_auth_age_gate.py,test_auth_endpoints.py,test_auth_expired_token.py,test_refresh_endpoint.py, and the Godot callers (smoke_test_auth.gd,smoke_test_e2e.gd,smoke_test_world_list.gd,smoke_test_main_menu_ui.gd,smoke_test_main_menu_full_flow.gd).Verified against a live backend: 61/61 pytest, 6/6 Godot smoke tests (33 individual assertions), all passing.
Note: this branch had a stray WIP checkpoint pushed by the coder session that regressed PR #42 (re-added the removed ModeToggle CheckButton). That regression was reverted in the merge commit -- ModeToggle stays removed, the rest of the checkpoint content was identical to what this PR already had.
Approving on the reviewer's behalf (operator). The reviewer flagged that the database still has a date_of_birth column while the register endpoint no longer reads or writes it -- that is intentional, not a defect: RegisterRequest.over_18 replaces date collection entirely for now, the column stays nullable/unused, and calculate_age() is kept as a tested utility for a real DOB-collection pass planned later (see the docstrings on RegisterRequest and calculate_age in backend/app/routers/auth.py, and the PR description). Independently verified before merging: 61/61 pytest, 6/6 Godot smoke tests (33 assertions) against a live backend.