Merge lp:~cjwatson/launchpad/archive-getallpermissions into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | William Grant on 2012-08-10 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15789 |
| Proposed branch: | lp:~cjwatson/launchpad/archive-getallpermissions |
| Merge into: | lp:launchpad |
| Diff against target: |
259 lines (+98/-14) 7 files modified
lib/lp/_schema_circular_imports.py (+1/-0) lib/lp/soyuz/browser/tests/test_archive_webservice.py (+27/-3) lib/lp/soyuz/interfaces/archive.py (+10/-0) lib/lp/soyuz/interfaces/archivepermission.py (+7/-0) lib/lp/soyuz/model/archive.py (+5/-0) lib/lp/soyuz/model/archivepermission.py (+13/-0) lib/lp/soyuz/stories/webservice/xx-archive.txt (+35/-11) |
| To merge this branch: | bzr merge lp:~cjwatson/launchpad/archive-getallpermissions |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | Approve on 2012-08-10 | |
| Steve Kowalik (community) | code | 2012-08-01 | Approve on 2012-08-08 |
|
Review via email:
|
|||
Commit Message
Add exported Archive.
Description of the Change
== Summary ==
Bug 1030936: The Ubuntu Developer Membership Board would like to be able to correlate the list of permissions granted on the Ubuntu archive against the membership of the ~ubuntu-dev team. Unfortunately, due to the variety of possible permission types and targets, it's prohibitively expensive to get such a list using the current API.
== Proposed fix ==
Add an exported Archive.
== LOC Rationale ==
+50. I have 3911 lines of credit; this should come out in the wash.
== Tests ==
bin/test -vvct lib/lp/
== Demo and Q/A ==
Look through the contents of lp.distribution
== Lint ==
One pre-existing false positive and some pre-existing doctest cruft which I don't think is worth attempting to fix here:
./lib/lp/
346: redefinition of function 'private' from line 342
./lib/lp/
43: want exceeds 78 characters.
47: want exceeds 78 characters.
173: want exceeds 78 characters.
190: want exceeds 78 characters.
207: want exceeds 78 characters.
224: want exceeds 78 characters.
397: want exceeds 78 characters.
458: want exceeds 78 characters.
589: want exceeds 78 characters.
648: want exceeds 78 characters.
| Robert Collins (lifeless) wrote : | # |
| Robert Collins (lifeless) wrote : | # |
(Unless you intend to always return permissions even if the person
calling the API can't see the involved teams [not a problem for
Ubuntu, but its implicit in the model...] - that would require a
different approach.)
| Steve Kowalik (stevenk) wrote : | # |
I don't think we need to worry about visibility for this case -- you can't create ArchivePermissions for PPAs, and the governance around adding permissions for the Ubuntu primary archive would quickly quash a private team, so I think it's fine.
| William Grant (wgrant) wrote : | # |
ArchivePermissions can be created for PPAs, and private archives (PPA or distribution) will probably want private teams in future. We need to either restrict private teams from participating here, or preload permissions.
| William Grant (wgrant) wrote : | # |
Doesn't fix the private team permission check case, but it's unlikely to be a problem right now, and we don't have a truly good solution yet.

This has a hidden late evaluation case, which if you're dealing with a
large data set will punish you: you are returning team/person objects,
but they are not always visible to the user, so you need to eager
evaluate visibility (or push it down into your query).