[wp-trac] [WordPress Trac] #29714: user_can_access_admin_page() returning false for edit.php?post_type=CPT
WordPress Trac
noreply at wordpress.org
Thu Nov 6 19:07:02 UTC 2014
#29714: user_can_access_admin_page() returning false for edit.php?post_type=CPT
----------------------------------------+------------------------------
Reporter: bobbingwide | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+------------------------------
Comment (by johnrom):
I did not and will not have the availability for a few days. However, I
can see that it is possible that $_wp_submenu_nopriv would have never been
populated with the correct values that you are trying to test for, since
$pagenow was not set to the same value during the creation of
$_wp_submenu_nopriv
That's all I've got for now, and it's only a guess. Have you tested to
ensure that a user role without the privileges to edit your custom post
type (but with and without edit_posts and create_posts) is indeed unable
to reach the post-new page?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29714#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list