summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi7
1 files changed, 1 insertions, 6 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 64b239628..b1889cd03 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -153,15 +153,10 @@ if ($product_name eq '') {
$product = $enterable_products[0];
}
}
-else {
- # Do not use Bugzilla::Product::check_product() here, else the user
- # could know whether the product doesn't exist or is not accessible.
- $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.
-$user->can_enter_product($product ? $product->name : $product_name, THROW_ERROR);
+$product = $user->can_enter_product($product || $product_name, THROW_ERROR);
##############################################################################
# Useful Subroutines