[wp-trac] [WordPress Trac] #14343: user_can_access_admin_page not recognising taxonomies (was: Custom taxonomy capabilities (update term))

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 18 12:23:55 UTC 2010


#14343: user_can_access_admin_page not recognising taxonomies
--------------------------+-------------------------------------------------
 Reporter:  ClementN      |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  3.0            
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------

Comment(by duck_):

 This happens for any taxonomy, not just custom defined ones (try visiting
 {{{edit-tags.php?taxonomy=category}}} as a subscriber). The root of the
 problem is that {{{user_can_access_admin_page()}}} is not recognising the
 {{{edit-tags.php?taxonomy=TAX_NAME}}} entry in {{{$_wp_submenu_nopriv}}}
 since the pagenow global is set to edit-tags.php (note lack of query
 string).

 Quick fix patch (not addressing problem described above) emulates
 behaviour in edit.php; implements a secondary check after the check in
 menu.php should deny access.

 NB: the the links are all being removed from the menu, talking about
 visiting the URL directly as a user without the correct privileges.

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


More information about the wp-trac mailing list