From: Jeremy Kerr Date: Sun, 21 Apr 2013 06:50:46 +0000 (+0800) Subject: bundles: Don't display 'Change order' button on public bundle view X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=commitdiff_plain;h=99209535d901a7bb1f10ad7d1de0a9f6308b2ce7 bundles: Don't display 'Change order' button on public bundle view Signed-off-by: Jeremy Kerr --- diff --git a/apps/patchwork/tests/bundles.py b/apps/patchwork/tests/bundles.py index 0032978..5e8b95b 100644 --- a/apps/patchwork/tests/bundles.py +++ b/apps/patchwork/tests/bundles.py @@ -238,6 +238,7 @@ class BundlePublicModifyTest(BundleTestBase): password = self.other_user.username) response = self.client.get(bundle_url(self.bundle)) self.assertNotContains(response, 'name="form" value="bundle"') + self.assertNotContains(response, 'Change order') def testBundleFormSubmission(self): oldname = 'oldbundlename' diff --git a/apps/patchwork/views/bundle.py b/apps/patchwork/views/bundle.py index 3c89338..7a120dd 100644 --- a/apps/patchwork/views/bundle.py +++ b/apps/patchwork/views/bundle.py @@ -179,7 +179,7 @@ def bundle(request, username, bundlename): 'bundlename': bundle.name}, filter_settings = filter_settings, patches = bundle.ordered_patches(), - editable_order = True) + editable_order = is_owner) context['bundle'] = bundle context['bundleform'] = form