]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1033445 - Certain webservice methods such as Bug.get and Bug.attachments should...
authorDavid Lawrence <dkl@redhat.com>
Thu, 3 Jul 2014 12:45:57 +0000 (12:45 +0000)
committerDavid Lawrence <dkl@redhat.com>
Thu, 3 Jul 2014 12:45:57 +0000 (12:45 +0000)
r=sgreen,a=glob

Bugzilla/WebService/Bug.pm

index a905d95266d9b084f43e9e5e02d00666a5c97d07..0346511a9434f65aef27606fd43268fb15b67480 100644 (file)
@@ -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}))