Anonymous API access to some collections returns nothing

Bug #515761 reported by Jamal Fanaian
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
Jamal Fanaian

Bug Description

The API does not allow anonymous access to project releases.

>>> from launchpadlib.launchpad import Launchpad, EDGE_SERVICE_ROOT
>>> lp = Launchpad.login('testing', '', '', EDGE_SERVICE_ROOT)
>>> lp.projects['zeitgeist'].development_focus.releases.entries
[]

The same request, with proper authentication, will return the desired results.

Related branches

Revision history for this message
Jamal Fanaian (jamalta) wrote :

It looks like the issue roots at not being able to access a project's series anonymously.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 515761] Re: Not able to access project releases anonymously

On 2 February 2010 18:39, Jamal Fanaian <email address hidden> wrote:
> It looks like the issue roots at not being able to access a project's
> series anonymously.

It's strange you get no response rather than an error.

Things like this are probably bugs in Launchpad rather than launchpadlib.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Jamal Fanaian (jamalta) wrote :

On Wed, Feb 3, 2010 at 10:41 AM, Martin Pool <email address hidden> wrote:

> Things like this are probably bugs in Launchpad rather than
> launchpadlib.
>

I figured it wasn't a launchpadlib issue, but wasn't sure what the proper
project for API bugs would be. I guess in this case it would probably be
Launchpad Registry, right?

Thanks for the input.

description: updated
Revision history for this message
Vikram Dhillon (dhillon-v10) wrote : Re: Not able to access project releases anonymously

Seems like a lot of people are reporting not being able to access launchpad anonymously, and I get the same results with the code above too. Therefore marking this one confirmed. Thanks.

Changed in launchpadlib:
status: New → Confirmed
Revision history for this message
Markus Korn (thekorn) wrote :

I experience this issue for all kind of collections, for example:

In [1]: list(launchpad.bugs[1].subscriptions)
Out[1]: []

In [2]: list(launchpad.bugs[123456].messages)
Out[2]: []

As you can see in the attached output of a python session with httplib2 debug turned on it looks like everything works correct, launchpadlib knows that there are more than one batches to fetch, but the entires field has just no content.

Revision history for this message
Markus Korn (thekorn) wrote :
summary: - Not able to access project releases anonymously
+ Not able to access collections anonymously
William Grant (wgrant)
summary: - Not able to access collections anonymously
+ Anonymous API access to some collections returns nothing
affects: launchpadlib → launchpad-foundations
Revision history for this message
William Grant (wgrant) wrote :

The problem here is that Launchpad's configuration of lazr.restful checks for launchpad.View, which isn't defined for lots of objects. In that case it falls to the ('launchpad.View', Interface) -> ViewByLoggedInUser adapter, which has no checkUnauthenticated.

Is there a good reason for it not return True for authenticated users too?

This is the entire bug behind bug.messages' and bug.subscriptions' emptiness, but project.series is broken because ViewProductSeries misspells its 'permission' attribute.

Revision history for this message
William Grant (wgrant) wrote :

In the second paragraph I of course meant to say "for unauthenticated users too."

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

> Is there a good reason for it not return True for authenticated users too?

More restricted security default.

Proper security definitions should be defined for these objects.

Jamal Fanaian (jamalta)
Changed in launchpad-foundations:
assignee: nobody → Jamal Fanaian (jamalta)
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in launchpad-foundations:
status: Confirmed → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-needstesting
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Ursula Junque (ursinha)
Changed in launchpad-foundations:
milestone: none → 10.02
Curtis Hovey (sinzui)
Changed in launchpad-foundations:
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.