[wp-hackers] Adding editing rights for specific posts in a custom post type

Steve Taylor steve at sltaylor.co.uk
Tue Mar 8 23:01:42 UTC 2011


Hi David,

I've found this plugin invaluable:

http://wordpress.org/extend/plugins/members/

What you're describing doesn't sound as if it'll be entirely catered
for by the plugin, but it should help a lot.

Past that, you'll need to understand how you're using the
'capability_type' and 'capabilities' arguments for
register_post_type() (if that's under your control and not exclusively
managed by the plugin. I dealt with this briefly but I forget the
details. Oh, here's an article by the saviour who did the plugin:

http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types

Hope this helps...

Steve Taylor

On 8 March 2011 21:56, David F. Carr <david at carrcommunications.com> wrote:
> I'd like to replicate some functionality from an older website I have on top
> of WordPress, but it's going to require some modification of the default way
> WordPress handles post editing rights.
>
> On the old site, I have an event listing system where multiple officers of
> an organization can share editing rights to an event posting. Everyone has
> the right to edit their own posts, but members of a group can edit each
> other's posts.
>
> I have a WordPress plugin called RSVPMaker that has some nicer functionality
> for event management, but I need to figure out how to retrofit this other
> functionality onto it. RSVPMaker events are tracked through a custom post
> type, so what I want to do is allow selected users to edit each other's
> posts without making them editors with access to all posts. How do I hook
> into the WordPress access rights system?
>
> In pseudocode, what I want to implement is
>
> if (user is trying to edit or post an edit AND post type=='rsvpmaker')
>  if(user owns post OR user has group access rights)
>     allow access
>  else
>     refuse access
>
> Suggestions?
>
> --
> David F. Carr
> david at carrcommunications.com
> Writer, Editor, Web Consultant
> Forbes.com Technology Blog http://blogs.forbes.com/davidcarr/
> LinkedIn - http://www.linkedin.com/in/davidfcarr
> Carr Communications Inc.- http://www.carrcommunications.com/
> Facebook - http://www.facebook.com/carrcomm
> _______________________________________________
> 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