summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-03-17 05:41:43 +0100
committerByron Jones <glob@mozilla.com>2015-03-17 05:41:43 +0100
commit65988561b17b5ccdb9fed10ecbed00ff0a2939f8 (patch)
treeeb8aa5fccb814b09324e18779d53223f154c6c18 /extensions
parent2d8badfce2364ffe22bbd8448e7a74bbccba10c7 (diff)
downloadbugzilla-65988561b17b5ccdb9fed10ecbed00ff0a2939f8.tar.gz
bugzilla-65988561b17b5ccdb9fed10ecbed00ff0a2939f8.tar.xz
Bug 1143536: product dashboard doesn't honour product visibility
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ProductDashboard/Extension.pm9
1 files changed, 3 insertions, 6 deletions
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;
}