[wp-trac] [WordPress Trac] #22895: user_can_admin_menu() is Type-Insensitive for Users who Can't Create Pages

WordPress Trac noreply at wordpress.org
Sat Dec 29 07:32:41 UTC 2012


#22895: user_can_admin_menu() is Type-Insensitive for Users who Can't Create Pages
-----------------------------+------------------
 Reporter:  kevinB           |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  3.6
Component:  Role/Capability  |     Version:  3.5
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------
Changes (by nacin):

 * milestone:  3.5.1 => 3.6


Comment:

 [attachment:22895.diff] is a hack that allows user_can_access_admin_page()
 to respect edit.php?post_type= pages. It still does not respect edit-
 tags.php?taxonomy= pages, though, and neither does
 get_admin_page_parent(). Overall, the whole thing is a mess and needs to
 be rewritten. Fun. Even #12718 only touches the API, rather than the inner
 guts...

 Since this is a new feature, and I'm not really sure of the possible
 breakage that could be caused by [attachment:22895.diff] (one problem with
 the admin menu code is it is completely unmaintainable), I'm going to move
 this ticket to 3.6. So, 3.5 has create_posts with a caveat: It only works
 if the user has edit_posts, such as when the post type leverages
 edit_posts (like attachments do). Not the best, but also not something to
 go messing with a point release. Think of it as version 0.1.

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


More information about the wp-trac mailing list