Skip to content

Commit

Permalink
Do not show private bugs if user has not a proper access level
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4519 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
giallu committed Aug 1, 2007
1 parent 7085ac5 commit 3d900c4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/summary_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: summary_api.php,v 1.50 2007-07-31 22:55:03 giallu Exp $
# $Id: summary_api.php,v 1.51 2007-08-01 07:41:07 giallu Exp $
# --------------------------------------------------------

### Summary printing API ###
Expand Down Expand Up @@ -297,8 +297,16 @@ function summary_print_by_activity() {
$result = db_query( $query );

$t_count = 0;
$t_private_bug_threshold = config_get( 'private_bug_threshold' );
while ( $row = db_fetch_array( $result ) ) {
if ( $t_count++ == 10 ) break;
// Skip private bugs unless user has proper permissions
if ( ( VS_PRIVATE == bug_get_field( $row['id'], 'view_state' ) ) &&
( false == access_has_bug_level( $t_private_bug_threshold, $row['id'] ) ) ) {
continue;
}

if ( $t_count++ == 10 ) break;

$t_bugid = string_get_bug_view_link( $row['id'] );
$t_summary = $row['summary'];
$t_notescount = $row['count'];
Expand Down

0 comments on commit 3d900c4

Please sign in to comment.