From 2ecd676f8e8154f6364a3a158013250695ed9251 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 12 Oct 2005 09:08:54 +0000 Subject: Bug 306325: Move CanEnterProduct() and CanEnterProductOrWarn() out of globals.pl - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel r=wicked a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- describecomponents.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'describecomponents.cgi') diff --git a/describecomponents.cgi b/describecomponents.cgi index 9602c0fe0..8fec1ec26 100755 --- a/describecomponents.cgi +++ b/describecomponents.cgi @@ -30,7 +30,7 @@ require "globals.pl"; use vars qw($vars @legal_product); -Bugzilla->login(); +my $user = Bugzilla->login(); GetVersionTable(); @@ -39,7 +39,7 @@ my $template = Bugzilla->template; my $product = trim($cgi->param('product') || ''); my $product_id = get_product_id($product); -if (!$product_id || !CanEnterProduct($product)) { +if (!$product_id || !$user->can_enter_product($product)) { # Reference to a subset of %::proddesc, which the user is allowed to see my %products; @@ -47,7 +47,7 @@ if (!$product_id || !CanEnterProduct($product)) { # OK, now only add products the user can see Bugzilla->login(LOGIN_REQUIRED); foreach my $p (@::legal_product) { - if (CanEnterProduct($p)) { + if ($user->can_enter_product($p)) { $products{$p} = $::proddesc{$p}; } } -- cgit v1.2.3-65-gdbad