[wp-trac] [WordPress Trac] #11935: Only show "Add New" button on plugins.php if the user has the install_plugins capability

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 17 23:14:33 UTC 2010


#11935: Only show "Add New" button on plugins.php if the user has the
install_plugins capability
----------------------------+-----------------------------------------------
 Reporter:  jamescollins    |       Owner:           
     Type:  defect (bug)    |      Status:  new      
 Priority:  normal          |   Milestone:  3.0      
Component:  Administration  |     Version:  2.9.1    
 Severity:  normal          |    Keywords:  has-patch
----------------------------+-----------------------------------------------
Changes (by jamescollins):

  * keywords:  => has-patch


Comment:

 Since WP 2.9.1, [12750] introduced a permissions check (which is related
 to the WPMU merge).

 Instead of checking for:

 {{{
 if ( !is_multisite() || is_super_admin() )
 }}}

 It should check for:

 {{{
 if ( current_user_can('install_plugins') )
 }}}


 Simple patch attached.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11935#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list