diff options
author | David Lawrence <dkl@redhat.com> | 2014-07-07 19:25:58 +0200 |
---|---|---|
committer | David Lawrence <dkl@redhat.com> | 2014-07-07 19:25:58 +0200 |
commit | 64d77abe752e3d139dbfbb902f33d75e33d67fcc (patch) | |
tree | 6a249891040efa546174327769f9f22539fc0d23 /Bugzilla | |
parent | c14bf9bd40efc855148d34dca4f536b06f3481d6 (diff) | |
download | bugzilla-64d77abe752e3d139dbfbb902f33d75e33d67fcc.tar.gz bugzilla-64d77abe752e3d139dbfbb902f33d75e33d67fcc.tar.xz |
Bug 1033445: Certain webservice methods such as Bug.get and Bug.attachments should not use shadow db if user is logged in
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 0a8145d37..5ce098e74 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -395,7 +395,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 && scalar @$ids) @@ -1100,7 +1100,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})) |