From eb527a5c1ccff25425d5a080919ae88dc6d60533 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 3 Jul 2014 12:45:57 +0000 Subject: Bug 1033445 - Certain webservice methods such as Bug.get and Bug.attachments should not use shadow db if user is logged in r=sgreen,a=glob --- Bugzilla/WebService/Bug.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index a905d9526..0346511a9 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -374,7 +374,7 @@ sub _translate_comment { sub get { my ($self, $params) = validate(@_, 'ids'); - Bugzilla->switch_to_shadow_db(); + Bugzilla->switch_to_shadow_db() unless Bugzilla->user->id; my $ids = $params->{ids}; defined $ids || ThrowCodeError('param_required', { param => 'ids' }); @@ -1007,7 +1007,7 @@ sub update_see_also { sub attachments { my ($self, $params) = validate(@_, 'ids', 'attachment_ids'); - Bugzilla->switch_to_shadow_db(); + Bugzilla->switch_to_shadow_db() unless Bugzilla->user->id; if (!(defined $params->{ids} or defined $params->{attachment_ids})) -- cgit v1.2.3-24-g4f1b