Skip to content

Commit

Permalink
Bug 1033445 - Certain webservice methods such as Bug.get and Bug.atta…
Browse files Browse the repository at this point in the history
…chments should not use shadow db if user is logged in

r=sgreen,a=glob
  • Loading branch information
David Lawrence committed Jul 3, 2014
1 parent 99e02ea commit eb527a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bugzilla/WebService/Bug.pm
Expand Up @@ -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' });
Expand Down Expand Up @@ -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}))
Expand Down

0 comments on commit eb527a5

Please sign in to comment.