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

WordPress Trac wp-trac at lists.automattic.com
Sat Nov 6 00:38:11 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:  needs-patch
----------------------------+-----------------------------------------------

Comment(by nacin):

 Replying to [comment:39 WraithKenny]:
 > The only issue I see is that
 http://core.trac.wordpress.org/browser/trunk/wp-
 includes/capabilities.php#L890 checks the `edit_published_post` capability
 which means any `post_type` registered with `map_meta_cap => false` can
 not be deleted after publishing, even by admins, right?
 No, I'm saying, that code would be completely skipped. No mapping if
 map_meta_cap = false, regardless of capability_type.

 > My patch was merely a work-around for default settings, but unless I'm
 missing something, it's a bigger issue with `map_meta_cap => false`. I
 would figure, admins should be granted permissions for all post_types.

 > This would be a rare and limited case and would suggest that the default
 be true on map_meta_cap.

 It's by default false already. The only exception is when capability_type
 = post, but I consider that to be a bug in most cases. On the other hand a
 straight capability_type = post with no capabilities array should probably
 be map_meta_cap = true. That I can agree with. I think I will need to
 diagram it out.

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


More information about the wp-trac mailing list