Skip to content

Commit 8ff13c0

Browse files
committedFeb 27, 2013
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
1 parent 07d23bc commit 8ff13c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎core/access_api.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
435435
$s_thresholds[$t_project_id] = $t_report_bug_threshold[0];
436436
}
437437
}
438-
439438
if( !access_compare_level( $s_thresholds[$t_project_id], $t_access_level ) ) {
440439
return false;
441440
}
@@ -449,7 +448,7 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
449448
&& access_compare_level( $t_access_level, $p_access_level );
450449
}
451450

452-
return access_compare_level( $p_access_level, $t_access_level );
451+
return access_compare_level( $t_access_level, $p_access_level );
453452
}
454453

455454
/**

0 commit comments

Comments
 (0)
Please sign in to comment.