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 git-svn-id: https://develop.svn.wordpress.org/trunk@38695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e0f4a218fb
commit
e18c88ae19
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user