diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2010-07-19 08:17:35 +0200 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2010-07-19 08:26:26 +0200 |
commit | d2da1d19f82462bf0b357772bbab174281fc788a (patch) | |
tree | b620072f28c70ed37d6db6525a439bab8d357a6c /apps/patchwork/views/bundle.py | |
parent | 5d831f183a6039bebc561e0ad8c38c82df999d97 (diff) | |
download | patchwork-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/patchwork/views/bundle.py')
-rw-r--r-- | apps/patchwork/views/bundle.py | 3 |
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', |