launchpad.packagesets empty with anonymous login

Bug #510180 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
William Grant

Bug Description

When I log in through the API I only get a list of packagesets if I log in regularly, not when I log in anonymously. This is with launchpadlib 1.5.4 (lucid).

>>> from launchpadlib.launchpad import Launchpad, EDGE_SERVICE_ROOT
>>> my_lp = Launchpad.login_with("test", "edge", "/home/daniel/.launchpadlib/cache")
>>> anon_lp = Launchpad.login_anonymously("test", "edge", "/home/daniel/.launchpadlib/cache")
>>> [b for b in my_lp.packagesets]
[<packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/core>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/core>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/desktop-core>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/desktop-core>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/edubuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/edubuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/kernel>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/kernel>, <packageset at https://api.edge.launchpad.net/beta/package-sets/dapper/kernel>, <packageset at https://api.edge.launchpad.net/beta/package-sets/hardy/kernel>, <packageset at https://api.edge.launchpad.net/beta/package-sets/intrepid/kernel>, <packageset at https://api.edge.launchpad.net/beta/package-sets/jaunty/kernel>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/kubuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/kubuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/langpack>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/langpack>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/mobile>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/mobile>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/mythbuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/mythbuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/ubuntu-desktop>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/ubuntu-desktop>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/ubuntu-server>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/ubuntu-server>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/ubuntustudio>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/ubuntustudio>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/unr>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/unr>, <packageset at https://api.edge.launchpad.net/beta/package-sets/lucid/xubuntu>, <packageset at https://api.edge.launchpad.net/beta/package-sets/karmic/xubuntu>]
>>> [b for b in anon_lp.packagesets]
[]
>>>

Related branches

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I suspect the zcml declarations for packagesetset are too restrictive and need zope.public.

Changed in soyuz:
importance: Undecided → Low
status: New → Triaged
tags: added: trivial
Revision history for this message
William Grant (wgrant) wrote :

This just needs a ViewPackageset adapter deriving from AnonymousAuthorization, so lazr.restful knows the object is meant to be visible.

William Grant (wgrant)
Changed in soyuz:
assignee: nobody → William Grant (wgrant)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in soyuz:
milestone: none → 10.09
tags: added: qa-needstesting
Changed in soyuz:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in soyuz:
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.