Use correct capabilities checks when determining whether to show private posts. Props molecularbear. fixes #3827

git-svn-id: http://svn.automattic.com/wordpress/trunk@4940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-02-25 13:39:34 +00:00
parent 92afb1e407
commit 5fde2708cf
1 changed files with 2 additions and 2 deletions

View File

@ -966,9 +966,9 @@ class WP_Query {
if ( is_user_logged_in() ) { if ( is_user_logged_in() ) {
if ( 'post' == $post_type ) if ( 'post' == $post_type )
$cap = 'edit_private_posts'; $cap = 'read_private_posts';
else else
$cap = 'edit_private_pages'; $cap = 'read_private_pages';
if ( current_user_can($cap) ) if ( current_user_can($cap) )
$where .= " OR post_status = 'private'"; $where .= " OR post_status = 'private'";