summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-07-19 08:17:35 +0200
committerJeremy Kerr <jk@ozlabs.org>2010-07-19 08:26:26 +0200
commitd2da1d19f82462bf0b357772bbab174281fc788a (patch)
treeb620072f28c70ed37d6db6525a439bab8d357a6c /apps
parent5d831f183a6039bebc561e0ad8c38c82df999d97 (diff)
downloadpatchwork-d2da1d19f82462bf0b357772bbab174281fc788a.tar.bz2
patchwork-d2da1d19f82462bf0b357772bbab174281fc788a.tar.xz
views/bundle/public: Lookup on user
Currently, the public bundle view is only looking up bundles by their name. This may return multiple bundles if two users have bundles with the same name. This change adds the user to the bundle lookup. Reported-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/patchwork/views/bundle.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/patchwork/views/bundle.py b/apps/patchwork/views/bundle.py
index 9995fc6..18beb08 100644
--- a/apps/patchwork/views/bundle.py
+++ b/apps/patchwork/views/bundle.py
@@ -180,7 +180,8 @@ def mbox(request, bundle_id):
def public(request, username, bundlename):
user = get_object_or_404(User, username = username)
- bundle = get_object_or_404(Bundle, name = bundlename, public = True)
+ bundle = get_object_or_404(Bundle, name = bundlename, owner = user,
+ public = True)
filter_settings = [(DelegateFilter, DelegateFilter.AnyDelegate)]
context = generic_list(request, bundle.project,
'patchwork.views.bundle.public',