Re: [RFC PATCH] REST: enable token authentication

2017-05-26 Thread Philippe Pepiot
On 05/25/2017 10:47 AM, Andrew Donnellan wrote: > Token authentication is generally viewed as a more secure option for API > authentication than storing a username and password. > > Django REST Framework gives us a TokenAuthentication class and an authtoken > app that we can use to generate

Re: [PATCH 2/2] tests: Add tests for viewing private bundles

2017-05-26 Thread Stephen Finucane
On Thu, 2017-05-25 at 17:38 +1000, Andrew Donnellan wrote: > Add some tests to check that owners can view their private bundles > while > other authenticated users can't. > > Signed-off-by: Andrew Donnellan > > --- > > I'm not very familiar with writing Django

Re: [PATCH] docker: increase database connection timeout

2017-05-26 Thread Stephen Finucane
On Thu, 2017-05-25 at 16:01 +1000, Daniel Axtens wrote: > Andrew Donnellan writes: > > > When starting the Docker environment, if the web container can't > > see the > > database immediately, it waits 5 seconds, tries again, then waits > > 15 > > seconds more to

[PATCH 1/3] views: Enable downloading of cover mboxes

2017-05-26 Thread Stephen Finucane
Signed-off-by: Stephen Finucane --- patchwork/models.py | 5 - patchwork/urls.py| 2 ++ patchwork/views/cover.py | 13 + patchwork/views/utils.py | 45 +++-- 4 files changed, 46 insertions(+), 19

Re: [PATCH] docs/api: change POST to PATCH in REST API parameters example

2017-05-26 Thread Stephen Finucane
On Thu, 2017-05-25 at 18:05 +1000, Andrew Donnellan wrote: > api/rest.rst gives an example of how to POST parameters to the > PatchDetail > view at api/patches/. However, the endpoint in question > doesn't > support POST - you need to use PUT or PATCH. Change it to PATCH. > > Signed-off-by:

Re: [PATCH] docs: Correct pre-release regex

2017-05-26 Thread Stephen Finucane
On Fri, 2017-05-26 at 09:29 +0100, Stephen Finucane wrote: > There's no dot before the rc version. > > Signed-off-by: Stephen Finucane > Fixes: b02c43d ("docs: Add pre-release regex") I'm going to go right ahead and merge this as a noddy fix that I've validated locally.

[PATCH 2/3] REST: Expose cover mbox link via REST API

2017-05-26 Thread Stephen Finucane
Signed-off-by: Stephen Finucane --- patchwork/api/cover.py | 6 +- patchwork/tests/test_rest_api.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/patchwork/api/cover.py b/patchwork/api/cover.py index 797cadf..f69d329 100644 ---

[PATCH 0/3] Allow downloading of cover letter mboxes

2017-05-26 Thread Stephen Finucane
While we haven't totally integrated cover letters in the web UI yet (planned for 2.1), we do expose these in a limited way and fully expose them via the REST API. For the latter case, it should be possible to download cover letters in mbox format for users who want them. For the former case, it

[PATCH 3/3] views: Display correct download links for covers

2017-05-26 Thread Stephen Finucane
This means using the correct link for the cover mbox and not displaying one for the non-existent diff. Signed-off-by: Stephen Finucane --- patchwork/templates/patchwork/download_buttons.html | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH] docs: Correct pre-release regex

2017-05-26 Thread Stephen Finucane
There's no dot before the rc version. Signed-off-by: Stephen Finucane Fixes: b02c43d ("docs: Add pre-release regex") --- releasenotes/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasenotes/config.yaml b/releasenotes/config.yaml index