Skip to content

Commit a2904cc

Browse files
committed
Revisions: Change the capability needed to view revision diffs to edit_post.
Built from https://develop.svn.wordpress.org/trunk@37779 git-svn-id: http://core.svn.wordpress.org/trunk@37744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 4372cdf commit a2904cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: wp-admin/includes/ajax-actions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2778,7 +2778,7 @@ function wp_ajax_get_revision_diffs() {
27782778
if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) )
27792779
wp_send_json_error();
27802780

2781-
if ( ! current_user_can( 'read_post', $post->ID ) )
2781+
if ( ! current_user_can( 'edit_post', $post->ID ) )
27822782
wp_send_json_error();
27832783

27842784
// Really just pre-loading the cache here.

Diff for: wp-admin/revision.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
if ( ! $post = get_post( $revision->post_parent ) )
6464
break;
6565

66-
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'read_post', $post->ID ) )
66+
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) )
6767
break;
6868

6969
// Revisions disabled and we're not looking at an autosave

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.6-alpha-37774';
7+
$wp_version = '4.6-alpha-37779';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)