Skip to content

Commit

Permalink
Fix #12568: Allow per-project control over visibility of tags/monitoring
Browse files Browse the repository at this point in the history
When printing the history of a bug we should apply visibility
restrictions on a per-project basis so that people can specify that
users can see the monitor list (or tags) in one project but not another.
  • Loading branch information
davidhicks committed Dec 25, 2010
1 parent 48a898c commit bbcf0de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/history_api.php
Expand Up @@ -194,6 +194,8 @@ function history_get_raw_events_array( $p_bug_id, $p_user_id = null ) {

$t_private_bugnote_threshold = config_get( 'private_bugnote_threshold' );
$t_private_bugnote_visible = access_has_bug_level( config_get( 'private_bugnote_threshold' ), $p_bug_id, $t_user_id );
$t_tag_view_threshold = config_get( 'tag_view_threshold' );
$t_show_monitor_list_threshold = config_get( 'show_monitor_list_threshold' );

$t_standard_fields = columns_get_standard();

Expand Down Expand Up @@ -245,14 +247,14 @@ function history_get_raw_events_array( $p_bug_id, $p_user_id = null ) {

// tags
if( $v_type == TAG_ATTACHED || $v_type == TAG_DETACHED || $v_type == TAG_RENAMED ) {
if( !access_has_global_level( config_get( 'tag_view_threshold' ) ) ) {
if( !access_has_bug_level( $t_tag_view_threshold, $p_bug_id, $t_user_id ) ) {
continue;
}
}

// monitoring
if( $v_type == BUG_MONITOR || $v_type == BUG_UNMONITOR ) {
if( !access_has_global_level( config_get( 'show_monitor_list_threshold' ) ) ) {
if( !access_has_bug_level( $t_show_monitor_list_threshold, $p_bug_id, $t_user_id ) ) {
continue;
}
}
Expand Down

0 comments on commit bbcf0de

Please sign in to comment.