From 65988561b17b5ccdb9fed10ecbed00ff0a2939f8 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 17 Mar 2015 12:41:43 +0800 Subject: Bug 1143536: product dashboard doesn't honour product visibility --- extensions/ProductDashboard/Extension.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'extensions/ProductDashboard') diff --git a/extensions/ProductDashboard/Extension.pm b/extensions/ProductDashboard/Extension.pm index 1e6ddffe9..d22e3e4cc 100644 --- a/extensions/ProductDashboard/Extension.pm +++ b/extensions/ProductDashboard/Extension.pm @@ -77,13 +77,10 @@ sub _page_dashboard { return if !$product_name; - # Do not use Bugzilla::Product::check_product() here, else the user - # could know whether the product doesn't exist or is not accessible. - my $product = new Bugzilla::Product({'name' => $product_name}); - # We need to check and make sure that the user has permission - # to enter a bug against this product. - if (!$product || !$user->can_enter_product($product->name)) { + # to see this product. + my $product = Bugzilla::Product->new({ name => $product_name, cache => 1 }); + if (!$product || !$user->can_see_product($product->name)) { return; } -- cgit v1.2.3-24-g4f1b