mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Revisions: Change the capability needed to view revision diffs to edit_post
.
Merge of [37779] to the 4.5 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.5@37791 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eb107ac90f
commit
74afccdf6c
@ -2761,7 +2761,7 @@ function wp_ajax_get_revision_diffs() {
|
||||
if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) )
|
||||
wp_send_json_error();
|
||||
|
||||
if ( ! current_user_can( 'read_post', $post->ID ) )
|
||||
if ( ! current_user_can( 'edit_post', $post->ID ) )
|
||||
wp_send_json_error();
|
||||
|
||||
// Really just pre-loading the cache here.
|
||||
|
@ -63,7 +63,7 @@ default :
|
||||
if ( ! $post = get_post( $revision->post_parent ) )
|
||||
break;
|
||||
|
||||
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'read_post', $post->ID ) )
|
||||
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) )
|
||||
break;
|
||||
|
||||
// Revisions disabled and we're not looking at an autosave
|
||||
|
Loading…
x
Reference in New Issue
Block a user