Merge lp:~stevenk/launchpad/expose-iarchive-newauth into lp:launchpad
Proposed by
Steve Kowalik
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Steve Kowalik | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 11057 | ||||||||||||
Proposed branch: | lp:~stevenk/launchpad/expose-iarchive-newauth | ||||||||||||
Merge into: | lp:launchpad | ||||||||||||
Prerequisite: | lp:~stevenk/launchpad/subscribers-can-view-p3as | ||||||||||||
Diff against target: |
212 lines (+83/-43) 5 files modified
lib/lp/soyuz/doc/archiveauthtoken.txt (+1/-8) lib/lp/soyuz/interfaces/archive.py (+28/-19) lib/lp/soyuz/model/archive.py (+20/-16) lib/lp/soyuz/stories/webservice/xx-archive.txt (+10/-0) lib/lp/soyuz/tests/test_archive.py (+24/-0) |
||||||||||||
To merge this branch: | bzr merge lp:~stevenk/launchpad/expose-iarchive-newauth | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | code | Approve | |
Review via email: mp+28090@code.launchpad.net |
Commit message
Allow subscribers to view P3As, but not +packages. Add IArchive.
Description of the change
This branch implements two new functions in IArchive -- getAuthToken(), and getPrivateSourc
getAuthToken() simply checks if the user is subscribed to an archive, and returns an authtoken if they have one. If they don't, it returns None.
getPrivateSourc
To post a comment you must log in.
As William mentions on IRC, it doesn't seem desirable to let people retrieve private sources list lines for other people using the API. You probably want to force person to always be REQUEST_USER.
Not as important, but it would be nice to test that demonstrates newAuthToken does indeed raise ArchiveNotPrivate if the archive is not private.
And to nitpick: there's a missing empty line above the definition of TestArchiveTokens.