Permalink
Browse files

Fix invalid access denied error caused by access_has_bug_level()

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...
1 parent ac05a43 commit 9ec47a056156ac32e1f95cd0ec20d4db8bd54d3b @dregad dregad committed Feb 27, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 core/access_api.php
View
@@ -440,7 +440,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;
}
@@ -454,7 +453,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 );
}
/**

0 comments on commit 9ec47a0

Please sign in to comment.