Use import cap. Add old edit_files cap to list of caps to shutdown if DISALLOW_FILE_EDIT. see #13681

git-svn-id: http://svn.automattic.com/wordpress/trunk@15097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-06-01 18:08:27 +00:00
parent 1f60247343
commit bf354522bd
2 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ define('WP_LOAD_IMPORTERS', true);
/** Load WordPress Bootstrap */
require_once ('admin.php');
if ( !current_user_can('edit_files') )
if ( !current_user_can('import') )
wp_die(__('You do not have sufficient permissions to import content in this site.'));
$title = __('Import');

View File

@ -996,6 +996,7 @@ function map_meta_cap( $cap, $user_id ) {
else
$caps[] = 'do_not_allow';
break;
case 'edit_files':
case 'edit_plugins':
case 'edit_themes':
if ( defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ) {