View Issue Details

IDProjectCategoryView StatusLast Update
0003824mantisbtbugtrackerpublic2004-07-08 07:16
Reporterpermutations Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.18.3 
Fixed in Version0.19.0a1 
Summary0003824: private bug reports and bugnotes are sent out as notifications to everyone
Description

The "private" feature isn't so private. If a bug report or bug note is marked "private", those without proper privileges can't view it on the Web, but they still receive the notifications in email.

TagsNo tags attached.

Activities

vboctor

vboctor

2004-05-22 03:34

manager   ~0005553

Fixed in CVS. Will be included in 0.19.0. Following is how to fix it in 0.18.x:

In core/email_api.php: email_collect_recipients()

* OLD CODE SNIPPET

threshold

$t_threshold_min = email_notify_flag( $p_notify_type, 'threshold_min' ); $t_threshold_max = email_notify_flag( $p_notify_type, 'threshold_max' ); $t_threshold_users = project_get_all_user_rows( $t_project_id, $t_threshold_min ); foreach( $t_threshold_users as $t_user ) {
if ( $t_user['access_level'] <= $t_threshold_max ) {
$t_recipients[$t_user['id']] = true;
}
}

* NEW CODE SNIPPET

threshold

$t_bug_is_private = bug_get_field( $p_bug_id, 'view_state' ) == VS_PRIVATE; $t_threshold_min = email_notify_flag( $p_notify_type, 'threshold_min' ); $t_threshold_max = email_notify_flag( $p_notify_type, 'threshold_max' ); $t_threshold_users = project_get_all_user_rows( $t_project_id, $t_threshold_min ); foreach( $t_threshold_users as $t_user ) {
if ( $t_user['access_level'] <= $t_threshold_max ) {
if ( !$t_bug_is_private || $t_user['access_level'] >= config_get( 'private_bug_threshold' ) ) {
$t_recipients[$t_user['id']] = true;
}
}
}