= 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 >>> launchpad = Launchpad.login('test', '', '', 'https://api.launchpad.dev/beta/') >>> list(launchpad.projects['alsa-utils'].series) [<project_series at https://api.launchpad.dev/beta/alsa-utils/trunk>] >>> list(launchpad.bugs[1].messages) [<message at https://api.launchpad.dev/beta/firefox/+bug/1/comments/0>, <message at https://api.launchpad.dev/beta/firefox/+bug/1/comments/1>] >>> list(launchpad.bugs[1].subscriptions) [<bug_subscription at https://api.launchpad.dev/beta/bugs/1/+subscription/stevea>, <bug_subscription at https://api.launchpad.dev/beta/bugs/1/+subscription/name12>]
== Launchpad lint ==
Checking for conflicts. and issues in doctests and templates. Running jslint, xmllint, pyflakes, and pylint. Using normal rules.
Linting changed files: lib/canonical/launchpad/security.py lib/canonical/launchpad/apidoc/wadl-testrunner.xml lib/lp/bugs/stories/webservice/xx-bug.txt lib/lp/registry/stories/webservice/xx-project-registry.txt
« Back to merge proposal
= 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/