Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 8ff13c0d37460994044892833f3f525a74f2a103 1 parent 07d23bc
@dregad dregad authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  core/access_api.php
View
3  core/access_api.php
@@ -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 );
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.