WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/07/2016 10:08:52 PM (4 years ago)
Author:
flixos90
Message:

Multisite: Remove redundant is_super_admin() when checking for edit_others_posts.

The super admin on multisite as well as the administrator on non-multisite both have this capability already. For custom post types using different capabilities this change ensures that only users with that capability have permissions.

Fixes #39059. See #37616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r39210 r39539  
    14211421            $authors_dropdown = '';
    14221422
    1423             if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
     1423            if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
    14241424                $users_opt = array(
    14251425                    'hide_if_only_one_author' => false,
Note: See TracChangeset for help on using the changeset viewer.