Merge lp:~abentley/launchpad/unauthorized-email into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 11640 |
Proposed branch: | lp:~abentley/launchpad/unauthorized-email |
Merge into: | lp:launchpad |
Diff against target: |
68 lines (+20/-4) 2 files modified
lib/lp/code/mail/codehandler.py (+2/-1) lib/lp/code/mail/tests/test_codehandler.py (+18/-3) |
To merge this branch: | bzr merge lp:~abentley/launchpad/unauthorized-email |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+36504@code.launchpad.net |
Commit message
Status change emails don't produce OOPses.
Description of the change
= Summary =
Fix Bug #605347: Unauthorized merge approval gives oops rather than
Unauthorized message.
== Proposed fix ==
Handle Unauthorized exceptions like UserNotBranchRe
== Pre-implementation notes ==
== Implementation details ==
There are two reasons a user may be denied setting a status; They may not have
launchpad.Edit on the merge proposal, or they may not be permitted to set the
particular status they are trying to set.
The result is basically the same, so we can handle Zope's Unauthorized the same
as UserNotBranchRe
== Tests ==
bin/test -t test_not_a_reviewer codehandler
== Demo and Q/A ==
Create a merge proposal. Create another user. Send an email as the second
userr, formatted to set the merge proposal status to 'approved.' You should
get an error message, not an OOPS.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
./lib/lp/
80: E302 expected 2 blank lines, found 1
83: E302 expected 2 blank lines, found 1
86: E302 expected 2 blank lines, found 1
544: Line exceeds 78 characters.
./lib/lp/
197: E201 whitespace after '('
258: W291 trailing whitespace
626: W291 trailing whitespace
769: E202 whitespace before ')'
858: E202 whitespace before ')'
881: E202 whitespace before ')'
1159: E301 expected 1 blank line, found 2
1161: E301 expected 1 blank line, found 0
1434: W391 blank line at end of file
242: Line exceeds 78 characters.
258: Line has trailing whitespace.
616: Line exceeds 78 characters.
622: Line exceeds 78 characters.
626: Line has trailing whitespace.