Check create_users cap. see #14435

git-svn-id: http://svn.automattic.com/wordpress/trunk@16184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-11-04 16:27:18 +00:00
parent a9e5ade43f
commit f903ceb524
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ $submenu['sites.php'][10] = array( __('Add New'), 'create_sites', 'site-new.php
$menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div'); $menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div');
$submenu['users.php'][5] = array( __('Users'), 'manage_network_users', 'users.php' ); $submenu['users.php'][5] = array( __('Users'), 'manage_network_users', 'users.php' );
$submenu['users.php'][10] = array( __('Add New'), 'manage_network_users', 'user-new.php' ); $submenu['users.php'][10] = array( __('Add New'), 'create_users', 'user-new.php' );
$menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div'); $menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div');
$submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); $submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' );

View File

@ -14,7 +14,7 @@ require_once('./admin.php');
if ( ! is_multisite() ) if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) ); wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can('manage_network_users') ) if ( ! current_user_can('create_users') )
wp_die(__('You do not have sufficient permissions to add users to this network.')); wp_die(__('You do not have sufficient permissions to add users to this network.'));
if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) { if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) {