Check cap before showing comments from private posts in recent comments dashboard widget. fixes #9144.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-03-22 14:01:43 +00:00
parent 6c75300614
commit 59c4af548b
1 changed files with 1 additions and 1 deletions

View File

@ -512,7 +512,7 @@ function wp_dashboard_recent_comments() {
foreach ( $possible as $comment ) {
if ( count( $comments ) >= $total_items )
break;
if ( in_array( $comment->comment_approved, $allowed_states ) )
if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) )
$comments[] = $comment;
}