Skip to content

Commit

Permalink
Fix invalid access denied error caused by access_has_bug_level()
Browse files Browse the repository at this point in the history
Commit d42e80c changed the code in
access_has_bug_level() function, and introduced a bug as the final call
to access_compare_level() inverted the 2 parameters which caused an
incorrect return value to be returned in certain cases, incorrectly
denying access to issues.

Issue #15538
  • Loading branch information
dregad committed Feb 27, 2013
1 parent 07d23bc commit 8ff13c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/access_api.php
Expand Up @@ -435,7 +435,6 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
$s_thresholds[$t_project_id] = $t_report_bug_threshold[0];
}
}

if( !access_compare_level( $s_thresholds[$t_project_id], $t_access_level ) ) {
return false;
}
Expand All @@ -449,7 +448,7 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
&& access_compare_level( $t_access_level, $p_access_level );
}

return access_compare_level( $p_access_level, $t_access_level );
return access_compare_level( $t_access_level, $p_access_level );
}

/**
Expand Down

0 comments on commit 8ff13c0

Please sign in to comment.