Commit eb527a5c authored by David Lawrence's avatar David Lawrence

Bug 1033445 - Certain webservice methods such as Bug.get and Bug.attachments…

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
parent 99e02eab
......@@ -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}))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment