I was wondering if it's possible to set up user roles in a way that means that users in certain groups can ONLY edit posts that have a specific taxonomy assigned to them e.g:
Properties (Post Type) Taxonomy One Taxonomy Two Taxonomy Three User Roles Group One - Can only edit properties with 'Taxonomy One' assigned. Group Two - Can only edit properties with 'Taxonomy Two' assigned. Group Three - Can only edit properties with 'Taxonomy Three' assigned.
I'm using the Members plugin for role management at the moment, and I'm using custom post types/taxonomies.
From what I've seen so far it doesn't look as though you can restrict access to POSTS based on TAXONOMIES.
I've now got permissions working for post types using the following code:
register_post_type( 'properties', array( 'labels' => array( 'name' => __( 'Properties' ), 'singular_name' => __( 'Property' ) ), 'public' => true, 'capability_type' => 'property', 'map_meta_cap' => true, 'capabilities' => array( 'publish_posts' => 'publish_properties', // This allows a user to publish a property. 'edit_posts' => 'edit_properties', // Allows editing of the user’s own properties but does not grant publishing permission. 'edit_others_posts' => 'edit_others_properties', // Allows the user to edit everyone else’s properties but not publish. 'delete_posts' => 'delete_properties', // Grants the ability to delete properties written by that user but not others’ properties. 'delete_others_posts' => 'delete_others_properties', // Capability to edit properties written by other users. 'read_private_posts' => 'read_private_properties', // Allows users to read private properties. 'edit_post' => 'edit_property', // Meta capability assigned by WordPress. Do not give to any role. 'delete_post' => 'delete_property', // Meta capability assigned by WordPress. Do not give to any role. 'read_post' => 'read_property', // Meta capability assigned by WordPress. Do not give to any role. ) ) );
A 'Properties' section has now appeared when editing roles in the 'Members' plugin which lets me restrict/allow access. Just need to figure out if this is do-able for each taxonomy now :)