diff options
author | lpsolit%gmail.com <> | 2009-05-21 10:43:23 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2009-05-21 10:43:23 +0200 |
commit | d04cb25873a44ba7d0eb9e8580180dd4a64e8cef (patch) | |
tree | a76548be71f093aa66633339db5dc477bbf14a80 /Bugzilla/User.pm | |
parent | 8eed4a2c9dddf6f03090ca516e6eca6c79c2a05a (diff) | |
download | bugzilla-d04cb25873a44ba7d0eb9e8580180dd4a64e8cef.tar.gz bugzilla-d04cb25873a44ba7d0eb9e8580180dd4a64e8cef.tar.xz |
Bug 339679: describecomponents.cgi doesn't show components of closed products, even when there are bugs in these products - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index bc142636e..ac6e72711 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -777,6 +777,12 @@ sub get_enterable_products { return $self->{enterable_products}; } +sub can_access_product { + my ($self, $product_name) = @_; + + return scalar(grep {$_->name eq $product_name} @{$self->get_accessible_products}); +} + sub get_accessible_products { my $self = shift; @@ -2003,6 +2009,20 @@ method should be called in such a case to force reresolution of these groups. Returns: an array of product objects. +=item C<can_access_product(product_name)> + +Returns 1 if the user can search or enter bugs into the specified product, +and 0 if the user should not be aware of the existence of the product. + +=item C<get_accessible_products> + + Description: Returns an array of product objects the user can search + or enter bugs against. + + Params: none + + Returns: an array of product objects. + =item C<check_can_admin_product($product_name)> Description: Checks whether the user is allowed to administrate the product. |