summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-11-10 07:01:07 +0100
committermkanat%bugzilla.org <>2006-11-10 07:01:07 +0100
commitbd49bafdb5915a8e738dcbb82c88e8ffdf65a769 (patch)
treeee0efd3ab3a7e7fed42ddd8f37f2e0a321ed84a1 /Bugzilla/User.pm
parentcbd3ffb71d9754b7ad7e69190a5eab39ee595f3e (diff)
downloadbugzilla-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.tar.gz
bugzilla-bd49bafdb5915a8e738dcbb82c88e8ffdf65a769.tar.xz
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.pm12
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) = @_;