[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
Fri Dec 5 16:20:14 UTC 2014


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

Comment (by greenshady):

 I believe I ran into a similar issue, but I'm not certain if it's the same
 yet.  I wanted to make sure I didn't need to open another ticket first.

 I have two post types.  The first has a normal, top-level menu.  The
 second is a sub-menu of the first.

 This is how it's set up:

 {{{
 - Type A
 --- Type A (all items)
 --- Type B (all items)
 }}}

 Users with the cap to view "Type A" get the access denied message because
 they don't have the cap to view "Type B".

 My workaround has been to check if the user has the cap to view Type A.
 If not, make Type B the top-level menu.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22895#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list