diff options
author | mkanat%bugzilla.org <> | 2006-11-10 06:01:07 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-11-10 06:01:07 +0000 |
commit | bd49bafdb5915a8e738dcbb82c88e8ffdf65a769 (patch) | |
tree | ee0efd3ab3a7e7fed42ddd8f37f2e0a321ed84a1 /Bugzilla/User.pm | |
parent | cbd3ffb71d9754b7ad7e69190a5eab39ee595f3e (diff) | |
download | bugs-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.tar bugs-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.tar.gz bugs-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.tar.bz2 bugs-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.tar.xz bugs-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.zip |
Bug 357482: Webservice should have a get_products method
Patch By Mads Bondo Dydensborg <mbd@dbc.dk> r=mkanat, a=myk
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index cadc8574d..b3bce9087 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -29,6 +29,7 @@ # Justin C. De Vries <judevries@novell.com> # Dennis Melentyev <dennis.melentyev@infopulse.com.ua> # Frédéric Buclin <LpSolit@gmail.com> +# Mads Bondo Dydensborg <mbd@dbc.dk> ################################################################################ # Module Initialization @@ -714,6 +715,17 @@ sub get_enterable_products { return $self->{enterable_products}; } +sub get_accessible_products { + my $self = shift; + + # Map the objects into a hash using the ids as keys + my %products = map { $_->id => $_ } + @{$self->get_selectable_products}, + @{$self->get_enterable_products}; + + return [ values %products ]; +} + sub can_request_flag { my ($self, $flag_type) = @_; |