there seems to be no way to access the requesting user from a property exported in the API

Bug #275637 reported by Michael Hudson-Doyle
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

We'd like to export the branches belonging to a person in the API as an attribute. But, we need to know who's asking so that we can filter branches to those that the requesting user can see.

This doesn't seem to be possible.

One way to do this would be to allow exporting a method (which we could decorate with call_with(requesting_user=REQUEST_USER)) as an attribute. I think I can see how this might begin to be possible, but I don't want to try to do it on my own because it will take ages, I'll probably get it wrong and I might be missing the way in which it is already possible :)

Revision history for this message
Leonard Richardson (leonardr) wrote :

Exporting a method as an attribute is a planned improvement. For now, you can export a method as a method. The only difference to the end-user difference will be the launchpadlib syntax and the URL to the information.

Curtis Hovey (sinzui)
tags: added: api
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
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.