I've created a custom post type and set show_in_menu to a string of another custom post type so that the admin menu shows:
Custom Post Type
-> All Posts
-> Add Post
-> All Second Custom Post Types
The user account can access the second custom post type listing page.
The user account gets "You do not have sufficient permissions to access this page." when clicking "Add Second Custom Post Type"
The user capabilities do not include general edit_post or edit_page... only capabilities specific to the custom post type and second custom post type... along with read and upload from the core.
I've narrowed down that a call to user_can_access_admin_page() is where the failure occurs. Even moreso it appears to be in the file /wp-admin/includes/plugin.php around lines 1545-1550 where it is looping through $_wp_submenu_nopriv array.
Any help would be appreciated. I've been trying to understand why this supported feature "show_in_menu" has been failing to allow the user to create a new custom post.
Thank you,
Ray