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...
dregad committed Feb 27, 2013
1 parent 07d23bc commit 8ff13c0d37460994044892833f3f525a74f2a103
Showing with 1 addition and 2 deletions.
  1. +1 −2 core/access_api.php
View
@@ -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;
}
@@ -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 );
}
/**

0 comments on commit 8ff13c0

Please sign in to comment.