Make WordPress Core


Ignore:
Timestamp:
12/16/2010 08:43:22 AM (13 years ago)
Author:
nacin
Message:

Remove check_permissions() calls outside of AJAX context. Also only check for switch_themes in check_permissions() for the themes table. see #15326.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r16989 r16990  
    1010require_once('./admin.php');
    1111
     12if ( is_multisite() ) {
     13    $menu_perms = get_site_option( 'menu_items', array() );
     14
     15    if ( empty( $menu_perms['plugins'] ) && ! is_super_admin() )
     16        wp_die( __( 'Cheatin’ uh?' ) );
     17}
     18
    1219if ( !current_user_can('activate_plugins') )
    1320    wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
    1421
    1522$wp_list_table = get_list_table('WP_Plugins_List_Table');
    16 $wp_list_table->check_permissions();
    1723
    1824$action = $wp_list_table->current_action();
Note: See TracChangeset for help on using the changeset viewer.