mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 23:25:50 +01:00
Make sure create_users is strippped from blog admins for multisite setups where add_new_users is not enabled. see #15357
git-svn-id: http://svn.automattic.com/wordpress/trunk@16551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da6fe519f3
commit
104c9ed3d8
@ -985,8 +985,12 @@ function map_meta_cap( $cap, $user_id ) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'create_users':
|
case 'create_users':
|
||||||
if ( !is_multisite() || is_super_admin() || get_site_option( 'add_new_users' ) )
|
if ( !is_multisite() )
|
||||||
$caps[] = $cap;
|
$caps[] = $cap;
|
||||||
|
elseif ( is_super_admin() || get_site_option( 'add_new_users' ) )
|
||||||
|
$caps[] = $cap;
|
||||||
|
else
|
||||||
|
$caps[] = 'do_not_allow';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Handle meta capabilities for custom post types.
|
// Handle meta capabilities for custom post types.
|
||||||
|
Loading…
Reference in New Issue
Block a user