summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
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) = @_;