WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/10/2017 09:10:48 PM (3 years ago)
Author:
flixos90
Message:

Multisite: Introduce an upgrade_network capability.

Prior to this change, a mix of is_super_admin() calls and manage_network capability checks was used to determine whether the current user could upgrade the network. With this changeset a dedicated capability is introduced that allows more granular handling.

Props dhanendran for the original patch.
Fixes #39205. See #37616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/upgrade.php

    r38819 r40404  
    3333require_once( ABSPATH . 'wp-admin/admin-header.php' );
    3434
    35 if ( ! current_user_can( 'manage_network' ) )
     35if ( ! current_user_can( 'upgrade_network' ) ) {
    3636    wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
     37}
    3738
    3839echo '<div class="wrap">';
Note: See TracChangeset for help on using the changeset viewer.