[wp-trac] [WordPress Trac] #21123: Enforce multisite plugins menu preference in map_meta_cap()
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 30 12:21:04 UTC 2012
#21123: Enforce multisite plugins menu preference in map_meta_cap()
-------------------------+-----------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.5
Component: Multisite | Version:
Severity: normal | Keywords:
-------------------------+-----------------
Rather than doing this:
{{{
if ( is_multisite() ) {
$menu_perms = get_site_option( 'menu_items', array() );
if ( empty( $menu_perms['plugins'] ) && ! current_user_can(
'manage_network_plugins' ) )
wp_die( __( 'Cheatin’ uh?' ) );
}
if ( !current_user_can('activate_plugins') )
wp_die( __( 'You do not have sufficient permissions to manage
plugins for this site.' ) );
}}}
We should simply map activate_plugins to manage_network_plugins in
map_meta_cap() when the conditionals are proper.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21123>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list