[wp-trac] [WordPress Trac] #50252: Capability issue with admin menu

WordPress Trac noreply at wordpress.org
Tue May 26 04:20:02 UTC 2020


#50252: Capability issue with admin menu
----------------------------+-----------------------------
 Reporter:  mort1305        |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  5.4.1
 Severity:  normal          |   Keywords:
  Focuses:  ui              |
----------------------------+-----------------------------
 An answering of a question on Stack Exchange
 ([https://wordpress.stackexchange.com/questions/367518/how-do-i-code-
 access-to-the-built-in-ui-of-a-cpt-when-its-placed-as-submenu-of]) led to
 the reporting of this bug.  Please refer to it for further explanation and
 coding examples.

 When a custom post type is registered, the {{{show_in_menu}}} option
 allows for the UI link of the custom post type to be nested under the menu
 of a second custom post type.  However, if the user is authorized to
 view/edit the first post type, the UI of said nested post type is
 unavailable if the user does not also possess the capabilities required of
 the post type represented in the parent menu.

 The bug is this:  the admin menu is properly displaying the links to pages
 which the user is capable of viewing, but the user is not permitted to
 access those pages.  The same can be said of any page whose link is nested
 in the admin menu under a page which the user does not possess the
 required capabilities of that parent.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50252>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list