summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Product.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-24 22:35:24 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-02-24 22:35:24 +0100
commit8b618be9d40747ae0477ac67e59213687626652f (patch)
treee7c48f9d080bbcc4de39162b1267ab5b9f76cddb /Bugzilla/WebService/Product.pm
parent8eb3b175a88f5c207991d86fbfae9c83f9a735a4 (diff)
downloadbugzilla-8b618be9d40747ae0477ac67e59213687626652f.tar.gz
bugzilla-8b618be9d40747ae0477ac67e59213687626652f.tar.xz
Bug 692507 - WebService API calls where appropriate should be using the shadow_db for read only operations
r=glob, a=LpSolit
Diffstat (limited to 'Bugzilla/WebService/Product.pm')
-rw-r--r--Bugzilla/WebService/Product.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm
index 7d4ddb147..136870890 100644
--- a/Bugzilla/WebService/Product.pm
+++ b/Bugzilla/WebService/Product.pm
@@ -47,23 +47,28 @@ BEGIN { *get_products = \&get }
# Get the ids of the products the user can search
sub get_selectable_products {
+ Bugzilla->switch_to_shadow_db();
return {ids => [map {$_->id} @{Bugzilla->user->get_selectable_products}]};
}
# Get the ids of the products the user can enter bugs against
sub get_enterable_products {
+ Bugzilla->switch_to_shadow_db();
return {ids => [map {$_->id} @{Bugzilla->user->get_enterable_products}]};
}
# Get the union of the products the user can search and enter bugs against.
sub get_accessible_products {
+ Bugzilla->switch_to_shadow_db();
return {ids => [map {$_->id} @{Bugzilla->user->get_accessible_products}]};
}
# Get a list of actual products, based on list of ids or names
sub get {
my ($self, $params) = validate(@_, 'ids', 'names');
-
+
+ Bugzilla->switch_to_shadow_db();
+
# Only products that are in the users accessible products,
# can be allowed to be returned
my $accessible_products = Bugzilla->user->get_accessible_products;