unassigning a private bug results in a red error box

Bug #717609 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Ian Booth

Bug Description

I had a bug 447550 which is private, that I can only see because I'm the assignee. I unassigned myself and this generated a big red backtrace box as a result:

Presumably this is because once unassigned, I can't see the bug anymore. So the unassignment access drop has to be deferred to end of transaction. I suggest by caching the access permission on the bug.

Unauthorized
(, 'getBugNotificationRecipients', 'launchpad.View')

Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.publisher-3.12.0-py2.6.egg/zope/publisher/publish.py", line 134, in publish
    result = publication.callObject(request, obj)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/lazr.restful-0.16.0-py2.6.egg/lazr/restful/publisher.py", line 173, in callObject
    WebServicePublicationMixin, self).callObject(request, object)
  File "/srv/launchpad.net/production/launchpad-rev-12351/lib/canonical/launchpad/webapp/publication.py", line 486, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.publisher-3.12.0-py2.6.egg/zope/publisher/publish.py", line 109, in mapply
    return debug_call(obj, args)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.publisher-3.12.0-py2.6.egg/zope/publisher/publish.py", line 115, in debug_call
    return obj(*args)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/lazr.restful-0.16.0-py2.6.egg/lazr/restful/_resource.py", line 926, in __call__
    result = self.do_PATCH(media_type, representation)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/lazr.restful-0.16.0-py2.6.egg/lazr/restful/_resource.py", line 1551, in do_PATCH
    return self.applyChanges(changeset)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/lazr.restful-0.16.0-py2.6.egg/lazr/restful/_resource.py", line 1197, in applyChanges
    notify(event)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.event-3.4.1-py2.6.egg/zope/event/__init__.py", line 23, in notify
    subscriber(event)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.component-3.9.3-py2.6.egg/zope/component/event.py", line 26, in dispatch
    zope.component.subscribers(event, None)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.component-3.9.3-py2.6.egg/zope/component/_api.py", line 138, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.component-3.9.3-py2.6.egg/zope/component/registry.py", line 323, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.interface-3.5.2-py2.6-linux-x86_64.egg/zope/interface/adapter.py", line 579, in subscribers
    subscription(*objects)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.component-3.9.3-py2.6.egg/zope/component/event.py", line 34, in objectEventNotify
    zope.component.subscribers((event.object, event), None)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.component-3.9.3-py2.6.egg/zope/component/_api.py", line 138, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.component-3.9.3-py2.6.egg/zope/component/registry.py", line 323, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/srv/launchpad.net/production/launchpad-rev-12351/eggs/zope.interface-3.5.2-py2.6-linux-x86_64.egg/zope/interface/adapter.py", line 579, in subscribers
    subscription(*objects)
  File "/srv/launchpad.net/production/launchpad-rev-12351/lib/canonical/database/sqlbase.py", line 754, in block_implicit_flushes_decorator
    return func(*args, **kwargs)
  File "/srv/launchpad.net/production/launchpad-rev-12351/lib/lp/bugs/subscribers/bugtask.py", line 73, in notify_bugtask_edited
    new_subscribers=new_subs)
  File "/srv/launchpad.net/production/launchpad-rev-12351/lib/lp/bugs/subscribers/bug.py", line 203, in add_bug_change_notifications
    recipients = bug_delta.bug.getBugNotificationRecipients(
Unauthorized: (, 'getBugNotificationRecipients', 'launchpad.View')

Tags: oops qa-ok

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

Oh, and of course, the exception means that the request oops and the unassignment is aborted.

tags: added: oops
Ian Booth (wallyworld)
Changed in launchpad:
assignee: nobody → Ian Booth (wallyworld)
Ian Booth (wallyworld)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.04
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
Robert Collins (lifeless) wrote :

On reflection I suspect this wasn't a regression.

tags: removed: regression
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.