Make WordPress Core

Opened 4 years ago

Last modified 11 months ago

#50252 new defect (bug)

Capability issue with admin menu

Reported by: mort1305's profile mort1305 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.1
Component: Role/Capability Keywords:
Focuses: ui, administration Cc:


An answering of a question on Stack Exchange ( 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.

Change History (3)

#1 @sabernhardt
2 years ago

  • Component changed from Administration to Role/Capability
  • Focuses administration added

#2 @manfcarlo
11 months ago

#52043 was marked as a duplicate.

#3 @manfcarlo
11 months ago

I decided to close #52043 since this one was opened first, although it appears the earliest report was in a comment at ticket:22895#comment:21

Note: See TracTickets for help on using tickets.