Bug 1151290: It is possible to tell if someone made a private comment on a bug even if you are not an 'insider'

r=dkl,a=glob


git-svn-id: svn://10.0.0.236/trunk@265931 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org
2015-04-13 21:00:48 +00:00
parent 040e80ee4d
commit 65055265c8
3 changed files with 10 additions and 4 deletions

View File

@@ -1 +1 @@
9383
9384

View File

@@ -1 +1 @@
0bcbc0faba0a0ed80eab653d3a696764686d202c
802a5cccd273b9c9bc25d3251452147cb84f5571

View File

@@ -2520,11 +2520,17 @@ sub _user_nonchanged {
sub _long_desc_changedby {
my ($self, $args) = @_;
my ($chart_id, $joins, $value) = @$args{qw(chart_id joins value)};
my $table = "longdescs_$chart_id";
push(@$joins, { table => 'longdescs', as => $table });
my $user_id = $self->_get_user_id($value);
$args->{term} = "$table.who = $user_id";
# If the user is not part of the insiders group, they cannot see
# private comments
if (!$self->_user->is_insider) {
$args->{term} .= " AND $table.isprivate = 0";
}
}
sub _long_desc_changedbefore_after {
@@ -2532,7 +2538,7 @@ sub _long_desc_changedbefore_after {
my ($chart_id, $operator, $value, $joins) =
@$args{qw(chart_id operator value joins)};
my $dbh = Bugzilla->dbh;
my $sql_operator = ($operator =~ /before/) ? '<=' : '>=';
my $table = "longdescs_$chart_id";
my $sql_date = $dbh->quote(SqlifyDate($value));