Merge lp:~tartley/canonical-identity-provider/rm-deactivated-check into lp:canonical-identity-provider/release
Status: | Merged |
---|---|
Approved by: | Jonathan Hartley |
Approved revision: | no longer in the source branch. |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | lp:~tartley/canonical-identity-provider/rm-deactivated-check |
Merge into: | lp:canonical-identity-provider/release |
Prerequisite: | lp:~tartley/canonical-identity-provider/rm-no-verified-address-para |
Diff against target: |
99 lines (+20/-30) 2 files modified
src/api/v20/handlers.py (+13/-17) src/api/v20/tests/test_handlers.py (+7/-13) |
To merge this branch: | bzr merge lp:~tartley/canonical-identity-provider/rm-deactivated-check |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matias Bordese (community) | Approve | ||
Review via email: mp+377387@code.launchpad.net |
Commit message
Unconditionally error if "not account.
Don't try to special-case "deactivated" accounts, since we cannot reach
this code with that account.status value.
Don't special case "suspended" accounts, since that is the only
status value which can reach this bit of code.
Instead, just unconditionally refuse to send the password reset
and return an error.
There was a test of special-case for "deactivated" accounts,
but to reach that code, the test monkey-patched to create an
impossible situation. Without that patching, the test now
demonstrates what actually happens (both before this change
and after it) - i.e. a deactivated account can send a password
reset email.
Add a comment about test assertions using mock_logging,
which actually do nothing.
Fix a few comment typos.
diff comments for reviewers