WordPress.org

Make WordPress Core

Changeset 37802


Ignore:
Timestamp:
06/21/2016 02:46:45 PM (4 years ago)
Author:
rachelbaker
Message:

Revisions: Change the capability needed to view revision diffs to edit_post.

Merge of [37779] to the 4.0 branch.

Location:
branches/4.0/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0/src/wp-admin/includes/ajax-actions.php

    r34154 r37802  
    25422542        wp_send_json_error();
    25432543
    2544     if ( ! current_user_can( 'read_post', $post->ID ) )
     2544    if ( ! current_user_can( 'edit_post', $post->ID ) )
    25452545        wp_send_json_error();
    25462546
  • branches/4.0/src/wp-admin/revision.php

    r28500 r37802  
    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
Note: See TracChangeset for help on using the changeset viewer.