Skip to content

Commit

Permalink
Fix 4769 - $g_limit_reporters=ON is ignored on button "jump to issue"
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@3083 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
marcelloscata committed Oct 25, 2004
1 parent 65c3fad commit 7638dab
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/access_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: access_api.php,v 1.31 2004-08-03 13:47:48 vboctor Exp $
# $Id: access_api.php,v 1.32 2004-10-25 19:47:51 marcelloscata Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -270,6 +270,16 @@ function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
$p_user_id = auth_get_current_user_id();
}

# check limit_Reporter (Issue #4769)
# reporters can view just issues they reported
$t_limit_reporters = config_get( 'limit_reporters' );
$t_report_bug_threshold = config_get( 'report_bug_threshold' );
if ( (ON === $t_limit_reporters) &&
(!bug_is_user_reporter( $p_bug_id, $p_user_id )) &&
( current_user_get_access_level() <= $t_report_bug_threshold ) ) {
return false;
}

# If the bug is private and the user is not the reporter, then the
# the user must also have higher access than private_bug_threshold
if ( VS_PRIVATE == bug_get_field( $p_bug_id, 'view_state' ) &&
Expand Down

0 comments on commit 7638dab

Please sign in to comment.