[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
Wed Sep 18 14:05:49 UTC 2013


#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.7
Component:  Role/Capability                    |     Version:  3.5
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch needs-testing 3.7-early  |
-----------------------------------------------+------------------

Comment (by johnbillion):

 Replying to [comment:8 nacin]:
 > 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).
 I've just run into this problem. A user who doesn't have the
 `create_posts` capability for a custom post type can't see the edit menu
 for that post type unless they also have the general `edit_posts`
 capability. This is caused by `$parent` in `user_can_access_admin_page()`
 being empty when it shouldn't.

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


More information about the wp-trac mailing list