Skip to content

Commit

Permalink
Bug 1143536: product dashboard doesn't honour product visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dklawren authored and globau committed Mar 17, 2015
1 parent 2d8badf commit 6598856
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions extensions/ProductDashboard/Extension.pm
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6598856

Please sign in to comment.