Require a full name — first and last — on every account #2
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Observation
What happens today
first_nameandlast_nameare inherited fromAbstractUserand are optional (blank=True). They are not collected at signup (ACCOUNT_SIGNUP_FIELDSinsrc/postulo/config/settings/base.pyasks only for email and password), and the profile form (src/postulo/accounts/forms.py,ProfileForm) declares both withrequired=False.The consequence is visible on documents:
contact_details()insrc/postulo/documents/rendering.pyprintsget_full_name() or display_name, so an account without a name gets the email local part at the top of its CV — during M3 a rendered CV read operator as the candidate's name. Making the name obligatory removes that failure mode.seed_demopapers over it by inventing a name only when the fields are empty.What changes
ACCOUNT_FORMS = {"signup": …}) or an adapter hook to add fields beyond the built-in set.ProfileForm: both fieldsrequired=True.blank=False— a data migration must supply values for existing rows, which is what makes this breaking.Why this is a breaking change
Existing accounts can have empty names — the local development database and the test instance on ragnar both do. A hard requirement on a populated table needs a migration and a decision about what to write into it.
Open questions
get_full_name()and the CV header working unchanged.blank=False, needs a backfill) or only in the forms (no migration, but the model still admits an empty name from the admin or the import)?Related: username identification and mandatory email verification are filed separately.