Role/Capability: Add explicit cases to map_meta_cap() for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191.

Fixes #38201

Built from https://develop.svn.wordpress.org/trunk@38695


git-svn-id: http://core.svn.wordpress.org/trunk@38638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2016-09-30 22:06:28 +00:00
parent a51267269b
commit 52cf3d3d0f
2 changed files with 11 additions and 1 deletions

View File

@ -402,6 +402,16 @@ function map_meta_cap( $cap, $user_id ) {
case 'delete_site':
$caps[] = 'manage_options';
break;
case 'create_sites':
case 'delete_sites':
case 'manage_network':
case 'manage_sites':
case 'manage_network_users':
case 'manage_network_plugins':
case 'manage_network_themes':
case 'manage_network_options':
$caps[] = $cap;
break;
default:
// Handle meta capabilities for custom post types.
global $post_type_meta_caps;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38694';
$wp_version = '4.7-alpha-38695';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.