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

Brent Shepherd thenbrent at gmail.com
Sun Jun 27 13:09:46 UTC 2010


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.




On Sat, Jun 26, 2010 at 7:47 AM, Andrew Nacin <wp at andrewnacin.com> wrote:

> On Fri, Jun 25, 2010 at 5:36 PM, Jake Goldman <
> wphackers at jakemgold.myfastmail.com> wrote:
>
> > I'm trying to create an equivalent to post *contributors*, not authors
> > (which I can do).
> >
> > Are you able to create a new role that can submit "questions" for review
> > via the admin, and can edit his / her own questions before publication,
> but
> > can't edit others' questions or published questions?
>
>
> Deny them the publish_questions capability. In fact, the only capability
> they should have (to be even with contributors) is the edit_questions
> capability.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list