Temporary fix for bug 916882: whitelist product and component when used with the changed* operators

r/a=glob


git-svn-id: svn://10.0.0.236/trunk@265030 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2013-09-24 09:48:22 +00:00
parent 854a204a6d
commit 96631b1ad3
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
8751 8752

View File

@ -66,7 +66,10 @@ sub add {
# Unsupported fields # Unsupported fields
if (grep { $_ eq $field } UNSUPPORTED_FIELDS ) { if (grep { $_ eq $field } UNSUPPORTED_FIELDS ) {
ThrowUserError('search_grouped_field_invalid', { field => $field }); # XXX - Hack till bug 916882 is fixed.
my $operator = scalar(@args) == 3 ? $args[1] : $args[0]->{operator};
ThrowUserError('search_grouped_field_invalid', { field => $field })
unless (($field eq 'product' || $field eq 'component') && $operator =~ /^changed/);
} }
$self->SUPER::add(@args); $self->SUPER::add(@args);