[wp-trac] [WordPress Trac] #14122: Custom "capabilities" appears broken on custom post types

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 17 06:18:30 UTC 2010


#14122: Custom "capabilities" appears broken on custom post types
----------------------------+-----------------------------------------------
 Reporter:  jakemgold       |       Owner:  nacin   
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  3.1     
Component:  Post Types      |     Version:  3.0     
 Severity:  normal          |    Keywords:          
----------------------------+-----------------------------------------------
Changes (by nacin):

  * keywords:  needs-patch needs-unit-tests =>


Comment:

 Okay, for [attachment:14122.remove.post_type_supports.author.diff], I
 realized that the changes to each file can be optionally considered
 separately.

 We can make the default capabilities be edit_posts/delete_posts if the
 post type doesn't support an author -- that doesn't prevent further
 customization from relying on the author, however, so no real restriction.
 So I would not revert the change from wp-includes/post.php.

 On the other hand, we can continue to check post_author in map_meta_cap()
 even if the post type doesn't support author. If it ends up using
 cap->edit_others_posts, then it'll be either the default 'edit_posts', or
 whatever is specified.

 Going to remove the bits from map_meta_cap().

 ----

 Unit tests can be handled in #UT11.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14122#comment:53>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list