Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9ec47a0

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 ac05a43 commit 9ec47a0

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
@@ -440,7 +440,6 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
440440
$s_thresholds[$t_project_id] = $t_report_bug_threshold[0];
441441
}
442442
}
443-
444443
if( !access_compare_level( $s_thresholds[$t_project_id], $t_access_level ) ) {
445444
return false;
446445
}
@@ -454,7 +453,7 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
454453
&& access_compare_level( $t_access_level, $p_access_level );
455454
}
456455

457-
return access_compare_level( $p_access_level, $t_access_level );
456+
return access_compare_level( $t_access_level, $p_access_level );
458457
}
459458

460459
/**

0 commit comments

Comments
 (0)
Please sign in to comment.