Unique email addresses
This adds unique constraints but disables them by adding a column that is always NULL. Changing a config setting and running an admin command enables the constraints.
See #145 (closed) (issue should remain open until we make this mandatory in uffd v3)
TODOs:
-
Migrations -
Decide on key function for email address comparison - Other software often treats email addresses as case-insensitive
- In LDAP RFC4518 stringprep (case-folding + unicode normalization + whitespace normalization + ...) would be applied
-
Decide whether or not to replace config key + command with just a command thats sets a feature flag in the database - Tests
-
Models -
CLI command -
Views
-
-
Translations -
Catch constraint violation when a new user is created in admin interface - Refactoring:
-
Rename UserEmail.address_key to address_normalized and UserEmail.build_address_key classmethod to normalize_address, I think that is more descriptive -
Clean up naming of cli command, feature flag, UserEmail.enforce_unique_constraint column
-
Edited by Julian