[wp-hackers] Custom Post Type + Capabilities & Roles

Jake Goldman wphackers at jakemgold.myfastmail.com
Sun Jun 27 13:57:34 UTC 2010


Exactly what happens to me. I'm fairly convinced at this point it's just 
an obscure bug. Even if it there's a way around this (Andrew?) it seems 
like this is a reasonable use case that just doesn't work as one should 
expect. You shouldn't be able to get to the "Add New" screen only to be 
presented with, effectively, a "you can't add this" error.

Will submit to trac later today.

Jake


On 6/27/2010 9:09 AM, Brent Shepherd wrote:
> Based on my experimentation, if a user had only the "edit_questions"
> capability, they would be able to view the "Questions" admin page, as well
> as the "Add Question" page. However, when entering a question on the "Add
> Question" page, the auto save script would throw a "You are not allowed to
> edit this post" error at the bottom of the edit box. When they click "Submit
> for Review" WordPress dies showing the "You are not allowed to edit this
> post" error.
>
> Andrew, have you created a custom post type with a custom capability and
> successfully been able to recreate a contributor role using just
> "edit_{custom_post}"? I haven't been able to make it work.
>    


More information about the wp-hackers mailing list