mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
1f60247343
commit
bf354522bd
@ -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');
|
||||
|
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user