Skip to content
Permalink
Browse files Browse the repository at this point in the history
Revisions: Change the capability needed to view revision diffs to `ed…
…it_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
  • Loading branch information
rachelbaker committed Jun 21, 2016
1 parent 4372cdf commit a2904cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wp-admin/includes/ajax-actions.php
Expand Up @@ -2778,7 +2778,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.
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/revision.php
Expand Up @@ -63,7 +63,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37774';
$wp_version = '4.6-alpha-37779';

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

0 comments on commit a2904cc

Please sign in to comment.