[bugzilla-gnome-org-customizations/production] [Browse] Allow accessing page when product is disabled for new bug entry
- From: Andre Klapper <aklapper src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-customizations/production] [Browse] Allow accessing page when product is disabled for new bug entry
- Date: Tue, 26 Feb 2019 23:56:00 +0000 (UTC)
commit 60cb5f612ca14d0cfae4a47435dadcd47a7e87a1
Author: Andre Klapper <a9016009 gmx de>
Date: Wed Feb 27 00:53:23 2019 +0100
[Browse] Allow accessing page when product is disabled for new bug entry
Fixes bug 796811. (Thanks to Olav and Carlos for pointers.)
extensions/Browse/lib/Util.pm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/extensions/Browse/lib/Util.pm b/extensions/Browse/lib/Util.pm
index c0185e2..6a39b0f 100644
--- a/extensions/Browse/lib/Util.pm
+++ b/extensions/Browse/lib/Util.pm
@@ -93,7 +93,7 @@ sub _page_browse {
if (!$product_name && $cgi->cookie('DEFAULTPRODUCT')) {
$product_name = $cgi->cookie('DEFAULTPRODUCT')
- if $user->can_enter_product($cgi->cookie('DEFAULTPRODUCT'));
+ if $user->can_see_product($cgi->cookie('DEFAULTPRODUCT'));
}
my $product_interests = $user->product_interests();
@@ -191,14 +191,12 @@ sub _page_browse {
}
}
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 = Bugzilla::Product->new({'name' => $product_name});
+ $product = Bugzilla::Product->check($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);
+ # to see this product.
+ $user->can_see_product($product ? $product->name : $product_name, THROW_ERROR);
# Remember selected product
$cgi->send_cookie(-name => 'DEFAULTPRODUCT',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]