[wp-trac] [WordPress Trac] #14122: Custom "capabilities" appears broken on custom post types
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 28 01:50:44 UTC 2010
#14122: Custom "capabilities" appears broken on custom post types
--------------------------+-------------------------------------------------
Reporter: jakemgold | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version: 3.0
Severity: major | Keywords: 2nd-opinion
--------------------------+-------------------------------------------------
Comment(by nacin):
We also have this bit of code:
{{{
$post_type = get_post_type_object( $post->post_type );
if ( $post_type && 'post' != $post_type->capability_type )
{
$args = array_merge( array(
$post_type->cap->edit_post, $user_id ), $args );
return call_user_func_array( 'map_meta_cap', $args
);
}
}}}
But that doesn't take into account that $post_type->capability_type might
be 'post', yet $post_type->cap->edit_psot might not be 'edit_post'. Hmm.
Definitely a lot of things to think about here.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14122#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list