From: David Lawrence Date: Thu, 3 Jul 2014 12:45:57 +0000 (+0000) Subject: Bug 1033445 - Certain webservice methods such as Bug.get and Bug.attachments should... X-Git-Tag: bugzilla-4.5.5~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb527a5c1ccff25425d5a080919ae88dc6d60533;p=thirdparty%2Fbugzilla.git 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 --- diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index a905d95266..0346511a94 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}))