WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/07/2017 12:52:24 PM (3 years ago)
Author:
flixos90
Message:

Multisite: Introduce a setup_network capability for setting up multisite.

setup_network is a new meta capability that brings more granular control over the permissions to setup a multisite environment. In a non-multisite environment it falls back to manage_options while in a multisite it falls back to manage_network_options. The introduction of this capability furthermore allows replacing an is_super_admin() check.

Props ashokkumar24 for the original patch.
Fixes #39206. See #37616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/capabilities.php

    r39588 r40390  
    228228            'delete_site'            => array(),
    229229
     230            'setup_network'          => array( 'administrator' ),
    230231            'upload_plugins'         => array( 'administrator' ),
    231232            'upload_themes'          => array( 'administrator' ),
     
    255256            'manage_network_themes'  => array(),
    256257            'manage_network_options' => array(),
     258            'setup_network'          => array(),
    257259            'upload_plugins'         => array(),
    258260            'upload_themes'          => array(),
Note: See TracChangeset for help on using the changeset viewer.