Title: Groups_Post_Access question
Last modified: August 22, 2016

---

# Groups_Post_Access question

 *  [sqhendr](https://wordpress.org/support/users/sqhendr/)
 * (@sqhendr)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/groups_post_access-question/)
 * So, I was looking at the documentation for the API, and I noted that the create
   method of Groups_Post_Access only seems to allow the addition of “groups_read_post”
   as a capability to restrict access. Does that mean if you have multiple groups,
   each with its own capability to restrict access, you can’t assign different capabilities
   to different posts to restrict access?
 * For example, let’s say I have two different post types: Type1 and Type2, and 
   I have two Groups: Group1 and Group2. Group1 can read Type1, and Group2 can read
   Type2, but they cannot read the post types for the other. I’ve created Capability1
   to handle the access restriction for Group1/Type1 and Capability2 to handle the
   access restriction for Group2/Type2. I would like to be able to restrict Type1
   using Capability1 when the post is created, and Type2 using Capability2 when 
   the post is created.
 * As I understand it, using Groups_Post_Access::create is the way to do that, but
   if it only allows “groups_read_post” as a capability, how can I achieve my goals?
 * Am I missing something?
 * [https://wordpress.org/plugins/groups/](https://wordpress.org/plugins/groups/)

The topic ‘Groups_Post_Access question’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sqhendr](https://wordpress.org/support/users/sqhendr/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/groups_post_access-question/)
 * Status: not resolved