diff -ur mantisbt-2.9.0/core/access_api.php mantis-2.9.0-AT/core/access_api.php --- mantisbt-2.9.0/core/access_api.php 2017-12-04 06:57:48.000000000 +0500 +++ mantis-2.9.0-AT/core/access_api.php 2017-12-20 15:40:36.000000000 +0500 @@ -536,6 +536,18 @@ # If the bug is private and the user is not the reporter, then # they must also have higher access than private_bug_threshold if( !$t_bug_is_user_reporter && bug_get_field( $p_bug_id, 'view_state' ) == VS_PRIVATE ) { + + // ====== check if user monitores ===== + $t_bug_monitor_table = db_get_table('mantis_bug_monitor_table'); + $query = "SELECT 1 FROM $t_bug_monitor_table WHERE bug_id=" . db_param() . " AND user_id = " . db_param(); + + $result = db_query_bound($query, Array($p_bug_id, $p_user_id)); + if (db_num_rows($result)) { + //treat as if bug was public + return access_compare_level($t_access_level, $p_access_level); + } + //====== end ====== + $t_private_bug_threshold = config_get( 'private_bug_threshold', null, $p_user_id, $t_project_id ); return access_compare_level( $t_access_level, $t_private_bug_threshold ) && access_compare_level( $t_access_level, $p_access_level ); diff -ur mantisbt-2.9.0/core/filter_api.php mantis-2.9.0-AT/core/filter_api.php --- mantisbt-2.9.0/core/filter_api.php 2017-12-04 06:57:48.000000000 +0500 +++ mantis-2.9.0-AT/core/filter_api.php 2017-12-20 15:41:26.000000000 +0500 @@ -1531,7 +1531,14 @@ } $t_count_public_only_project_ids = count( $t_public_only_project_ids ); - $t_public_view_state_check = '( ( {bug}.view_state = ' . VS_PUBLIC . ' ) OR ( {bug}.reporter_id = ' . $t_user_id . ') )'; +// ====== monitored issue view ===== + $t_public_view_state_check = '( + ( {bug}.view_state = ' . VS_PUBLIC . ' ) + OR ( {bug}.reporter_id = ' . $t_user_id . ') + OR (SELECT true FROM {bug_monitor} + WHERE {bug_monitor}.user_id = ' . $t_user_id . ' + AND {bug_monitor}.bug_id = {bug}.id LIMIT 1) + )'; +// ======= end =========== if( $t_count_public_only_project_ids == 1 ) { $t_public_only_query = '( ( {bug}.project_id = ' . $t_public_only_project_ids[0] . ' ) AND ' . $t_public_view_state_check . ')'; } else if( $t_count_public_only_project_ids > 1 ) {