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


git-svn-id: svn://10.0.0.236/trunk@265449 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-07-03 13:00:48 +00:00
parent cc7bc2d8f8
commit 830239d552
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
9072
9073

View File

@ -1 +1 @@
99e02eab80679cb1ac4ede7c4d8054b8a2164bad
eb527a5c1ccff25425d5a080919ae88dc6d60533

View 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}))