Skip to content

Commit

Permalink
Fix bug doesn't exist error in timeline feature
Browse files Browse the repository at this point in the history
The error was caused by 0f030fd which checks that the user has access to issues referenced in issue history.

Issue #9885

Conflicts:
	core/history_api.php
  • Loading branch information
vboctor committed Nov 15, 2014
1 parent 5f0b150 commit 5d1a57f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/history_api.php
Expand Up @@ -237,7 +237,11 @@ function history_get_raw_events_array( $p_bug_id, $p_user_id = null ) {

# relationships
if( $v_type == BUG_ADD_RELATIONSHIP || $v_type == BUG_DEL_RELATIONSHIP || $v_type == BUG_REPLACE_RELATIONSHIP ) {
if( !access_has_bug_level( VIEWER, $v_new_value, $t_user_id ) ) {
$t_related_bug_id = $v_new_value;

# If bug doesn't exist, then we don't know whether to expose it or not based on the fact whether it was
# accessible to user or not. This also simplifies client code that is accessing the history log.
if( !bug_exists( $t_related_bug_id ) || !access_has_bug_level( VIEWER, $t_related_bug_id, $t_user_id ) ) {
continue;
}
}
Expand Down

0 comments on commit 5d1a57f

Please sign in to comment.