Unauthorized merge approval gives oops rather than Unauthorized message.

Bug #605347 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Aaron Bentley

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Unauthorized merge approval gives oops rather than Unauthorized message.

I just tried to submit an approval for a merge request against
lp:bzr/2.2. It turns out that this branch doesn't have a Reviewer team,
so I'm not actually authorized to do so.

However, rather than getting a "You are not Authorized" email, I just
got an OOPS (1656CEMAIL3).

When looking at that oops, it ends with:

    context.merge_proposal.approveBranch(context.user, rev_id)
Unauthorized: (<BranchMergeProposal at 0x66abb50>, 'approveBranch',
'launchpad.Edit')

It would seem that Unauthorized should be trapped and returned to the
user, rather than just generating and internal OOPS.

John
=:->

  affects launchpad-code

- -------- Original Message --------
Subject: Submit Request Failure
Date: Wed, 14 Jul 2010 09:24:26 -0000
From: <email address hidden>
Reply-To: <email address hidden>
To: John Arbash Meinel <email address hidden>

An error occurred while processing a mail you sent to Launchpad's email
interface.

Error message:

Sorry, something went wrong when Launchpad tried processing your mail.
We've recorded what happened, and we'll fix it as soon as possible.
Apologies for the inconvenience.

If this is blocking your work, please file a question at
https://answers.edge.launchpad.net/launchpad/+addquestion
and include the error ID OOPS-1656CEMAIL3 in the description.

- --
For more information about using Launchpad by e-mail, see
https://help.launchpad.net/EmailInterface
or send an email to <email address hidden>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw9ihMACgkQJdeBCYSNAAOruACfWZq5Vl4GgsO12PdhC6QrFC/+
+hkAoMdjJn15kmXiJvOD7VlcluupwSKB
=f9QG
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Parth Malwankar wrote:
>> I would probably change the error message a little bit. Something like:
>>
>> "Branch %s appears to be bound to itself, please unbind"
>>
>
> I have fixed the error message. Thanks for the review.
>
> Sample output:
> [bzr-grep-checkout]% ~/src/bzr.dev/405192-get_nick-recursion-2.2/bzr ci -m "added z"
> bzr: ERROR: Branch "file:///home/parthm/tmp/bzr-grep-checkout/" appears to be bound to itself. Please use `bzr unbind` to fix.
> [bzr-grep-checkout]%
>

 review: approve
 merge: approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw9gc4ACgkQJdeBCYSNAAP9ngCfS+5rXYKow1hDt2bIfmR9tIF9
GmYAnA2fTXV2k1NyuGCILU1AuOiSKeDM
=kKgi
-----END PGP SIGNATURE-----

Related branches

John A Meinel (jameinel)
summary: - [Fwd: Submit Request Failure]
+ Unauthorized merge approval gives oops rather than Unauthorized message.
Paul Hummer (rockstar)
Changed in launchpad-code:
status: New → Triaged
importance: Undecided → High
tags: added: oops
Tim Penhey (thumper)
tags: added: code-review email
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in launchpad-code:
assignee: nobody → Aaron Bentley (abentley)
milestone: none → 10.10
tags: added: qa-needstesting
Changed in launchpad-code:
status: Triaged → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.