Merge lp:~jamalta/launchpad/515761-anonymrelease into lp:launchpad/db-devel
Proposed by
Jamal Fanaian
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~jamalta/launchpad/515761-anonymrelease | ||||
Merge into: | lp:launchpad/db-devel | ||||
Diff against target: |
270 lines (+84/-30) (has conflicts) 7 files modified
lib/canonical/launchpad/security.py (+36/-17) lib/lp/bugs/interfaces/bugtask.py (+2/-4) lib/lp/bugs/stories/webservice/xx-bug.txt (+12/-7) lib/lp/registry/browser/configure.zcml (+1/-1) lib/lp/registry/browser/productseries.py (+1/-1) lib/lp/registry/stories/webservice/xx-project-registry.txt (+14/-0) lib/lp/testing/factory.py (+18/-0) Text conflict in lib/canonical/launchpad/security.py Text conflict in lib/lp/testing/factory.py |
||||
To merge this branch: | bzr merge lp:~jamalta/launchpad/515761-anonymrelease | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | code | Approve | |
Review via email: mp+18641@code.launchpad.net |
Commit message
Created View classes for IMessage, IProductRelease, and IBugSubscription to allow anonymous API access to these interfaces. Fixed misspelling of 'permission' attribute for ViewProductSeries. Fixed security problem in test xx-product-
To post a comment you must log in.
= Summary =
Anonymous API Access to some collections returns nothing.
== Proposed fix ==
Create View classes in security.py for the interfaces that need anonymous access.
== Pre-implementation notes ==
Decision to make these collections available to everyone needs to be considered during review.
== Implementation details ==
Created ViewBugMessage, ViewProductRelease, and ViewBugSubscription in security.py with checkUnauthorized and checkAuthorized both returning True.
== Tests ==
% bin/test -vvct webservice/ xx-bug. txt
% bin/test -vvct xx-project-registry
== Demo and Q/A ==
>>> from launchpadlib. launchpad import Launchpad login(' test', '', '', 'https:/ /api.launchpad. dev/beta/ ') projects[ 'alsa-utils' ].series) /api.launchpad. dev/beta/ alsa-utils/ trunk>] bugs[1] .messages) /api.launchpad. dev/beta/ firefox/ +bug/1/ comments/ 0>, <message at https:/ /api.launchpad. dev/beta/ firefox/ +bug/1/ comments/ 1>] bugs[1] .subscriptions) /api.launchpad. dev/beta/ bugs/1/ +subscription/ stevea>, <bug_subscription at https:/ /api.launchpad. dev/beta/ bugs/1/ +subscription/ name12>]
>>> launchpad = Launchpad.
>>> list(launchpad.
[<project_series at https:/
>>> list(launchpad.
[<message at https:/
>>> list(launchpad.
[<bug_subscription at https:/
== Launchpad lint ==
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ security. py /launchpad/ apidoc/ wadl-testrunner .xml bugs/stories/ webservice/ xx-bug. txt registry/ stories/ webservice/ xx-project- registry. txt
lib/canonical
lib/canonical
lib/lp/
lib/lp/