Make WordPress Core


Ignore:
Timestamp:
04/10/2017 09:10:48 PM (8 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/includes/ms.php

    r40351 r40404  
    786786    global $wp_db_version, $pagenow;
    787787
    788     if ( ! is_super_admin() ) {
     788    if ( ! current_user_can( 'upgrade_network' ) ) {
    789789        return false;
    790790    }
Note: See TracChangeset for help on using the changeset viewer.