Restore some more cap checks for clarity. See #15326.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
944f37cd3e
commit
46cd784f3c
|
@ -8,7 +8,9 @@
|
||||||
|
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once( './admin.php' );
|
require_once( './admin.php' );
|
||||||
|
if ( !current_user_can( $post_type_object->cap->edit_posts ) )
|
||||||
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
|
|
||||||
$wp_list_table = get_list_table('WP_Posts_List_Table');
|
$wp_list_table = get_list_table('WP_Posts_List_Table');
|
||||||
$wp_list_table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
/** Load WordPress Administration Bootstrap */
|
/** Load WordPress Administration Bootstrap */
|
||||||
require_once ('admin.php');
|
require_once ('admin.php');
|
||||||
|
if ( ! current_user_can( 'manage_links' ) )
|
||||||
|
wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
|
||||||
|
|
||||||
$wp_list_table = get_list_table('WP_Links_List_Table');
|
$wp_list_table = get_list_table('WP_Links_List_Table');
|
||||||
$wp_list_table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
|
@ -11,7 +11,9 @@ if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-informat
|
||||||
|
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once('./admin.php');
|
require_once('./admin.php');
|
||||||
|
if ( ! current_user_can('install_plugins') )
|
||||||
|
wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
|
||||||
|
|
||||||
if ( is_multisite() && ! is_network_admin() ) {
|
if ( is_multisite() && ! is_network_admin() ) {
|
||||||
wp_redirect( network_admin_url( 'plugin-install.php' ) );
|
wp_redirect( network_admin_url( 'plugin-install.php' ) );
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once('./admin.php');
|
require_once('./admin.php');
|
||||||
|
|
||||||
|
if ( !current_user_can('activate_plugins') )
|
||||||
|
wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
|
||||||
|
|
||||||
$wp_list_table = get_list_table('WP_Plugins_List_Table');
|
$wp_list_table = get_list_table('WP_Plugins_List_Table');
|
||||||
$wp_list_table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@ if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'theme-informati
|
||||||
|
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once('./admin.php');
|
require_once('./admin.php');
|
||||||
|
if ( ! current_user_can('install_themes') )
|
||||||
|
wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
|
||||||
|
|
||||||
if ( is_multisite() && ! is_network_admin() ) {
|
if ( is_multisite() && ! is_network_admin() ) {
|
||||||
wp_redirect( network_admin_url( 'theme-install.php' ) );
|
wp_redirect( network_admin_url( 'theme-install.php' ) );
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
|
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once('./admin.php');
|
require_once('./admin.php');
|
||||||
|
if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') )
|
||||||
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
|
|
||||||
$wp_list_table = get_list_table('WP_Themes_List_Table');
|
$wp_list_table = get_list_table('WP_Themes_List_Table');
|
||||||
$wp_list_table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue