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:
ryan 2010-11-23 16:29:21 +00:00
parent da6fe519f3
commit 104c9ed3d8

View File

@ -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.