Merge lp:~cprov/canonical-identity-provider/username-validation-ng into lp:canonical-identity-provider/release
Proposed by
Celso Providelo
Status: | Merged |
---|---|
Approved by: | Celso Providelo |
Approved revision: | no longer in the source branch. |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | lp:~cprov/canonical-identity-provider/username-validation-ng |
Merge into: | lp:canonical-identity-provider/release |
Diff against target: |
285 lines (+49/-31) 7 files modified
src/api/v20/handlers.py (+2/-2) src/api/v20/tests/test_handlers.py (+3/-3) src/api/v20/tests/test_registration.py (+4/-4) src/identityprovider/forms.py (+26/-10) src/identityprovider/tests/test_forms.py (+7/-8) src/webui/tests/test_views_account.py (+2/-2) src/webui/tests/test_views_registration.py (+5/-2) |
To merge this branch: | bzr merge lp:~cprov/canonical-identity-provider/username-validation-ng |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Manrique (community) | Approve | ||
Review via email: mp+367193@code.launchpad.net |
Commit message
Consolidating username validation with LP.
Description of the change
Moving away from the overloaded regexp to a more flexible `valid_username()` function matching LP:
https:/
The new checker fixes the problem with arbitrary number of dashes ('x...x-x') and introduces a way to block bad patterns in a cleaner way (than the mysterious look-ahead).
To post a comment you must log in.
LGTM, I like the encapsulation/ simplification of validation.
See a couple of optionals inline.