Answers.Body: <p>No, ACLs are about including groups you can see, not about excluding the ones you can't.</p>
  
  <p>What we did for a case like you was to automatically add any new contact into a "visible by everyone" group and remove it if/when they are added to the "VIP" group. So what you do with smartgroups, but because we add/remove directly, it was faster as no need to wait for the cache to rebuild. It was a very long time ago, so probably nothing I can share anymore, but with two hooks in a small extension, it should be possible</p>
  
  <p>Have a look at civirules, it might even be possible to do it without code.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-19T15:32:38.447Z
Answers.Text: That's about what I was expecting.  Unfortunately, it doesn't seem that CiviRules has made the jump to 4.7 yet, nor is it currently on any road map to do so.  (Knew I should have held back!  Oh well.)  However, this begs a couple of questions.  First, is there a particular reason that ACL's aren't = and !=?  Secondly, anyone have a good example to look at for the hooks Xavier mentions?  I don't get enough practice to be a real coder, but I can copy and paste!
Answers.UserDisplayName: G H
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-19T10:30:18.737Z
Answers.LastActivityDate: 2016-02-19T10:30:18.737Z
Answers.UserDisplayName: Xavier
Body: <p>I've done some searching, but can't seem to hit the right keywords.  I'll pick on the major donor group for this question, though it would apply in other ways.</p>
  
  <p>Most of our users should have access to almost all of the contacts.  However, there is a small group who deal with major donors.   This group is only group who should be able to see the major donors.</p>
  
  <p>Currently we are using a group for major donors, and a smart group for anybody who is not in the major donor group.  The majority of users are in a user group that allows them to edit anyone in the unrestricted contact group.  This works great, except when adding a new contact.</p>
  
  <p>When the new contact is not in the major donor group, the majority of users still can't see the new user until the cron job runs to rebuild the smart group cache.  This messes with people's process and they loose where they are and what they are doing.  </p>
  
  <p>Is there a better way to restrict the group?  Can I set an ACL so that it's looking at anything that's NOT a part of a group, rather than a part of a group?  Anybody else doing something similar with a better way of doing this?  Can I set all new contacts to automatically be a part of the unrestricted smart group by default?</p>
  
Tags: <wordpress><contacts><smartgroups><acl><cron>
Title: Restricting access to a group of contacts
ThreadText: # Restricting access to a group of contacts
  
  (Asked by: username_0 on 2016-02-18)
  
  I've done some searching, but can't seem to hit the right keywords. I'll pick on the major donor group for this question, though it would apply in other ways.
  
  Most of our users should have access to almost all of the contacts. However, there is a small group who deal with major donors. This group is only group who should be able to see the major donors.
  
  Currently we are using a group for major donors, and a smart group for anybody who is not in the major donor group. The majority of users are in a user group that allows them to edit anyone in the unrestricted contact group. This works great, except when adding a new contact.
  
  When the new contact is not in the major donor group, the majority of users still can't see the new user until the cron job runs to rebuild the smart group cache. This messes with people's process and they loose where they are and what they are doing.
  
  Is there a better way to restrict the group? Can I set an ACL so that it's looking at anything that's NOT a part of a group, rather than a part of a group? Anybody else doing something similar with a better way of doing this? Can I set all new contacts to automatically be a part of the unrestricted smart group by default?
  
  **Tags:** wordpress, contacts, smartgroups, acl, cron
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-02-19. Score: 2 | Accepted answer
  
  No, ACLs are about including groups you can see, not about excluding the ones you can't.
  
  What we did for a case like you was to automatically add any new contact into a "visible by everyone" group and remove it if/when they are added to the "VIP" group. So what you do with smartgroups, but because we add/remove directly, it was faster as no need to wait for the cache to rebuild. It was a very long time ago, so probably nothing I can share anymore, but with two hooks in a small extension, it should be possible
  
  Have a look at civirules, it might even be possible to do it without code.
  
  > **Comments:**
  > **username_0**: That's about what I was expecting.  Unfortunately, it doesn't seem that CiviRules has made the jump to 4.7 yet, nor is it currently on any road map to do so.  (Knew I should have held back!  Oh well.)  However, this begs a couple of questions.  First, is there a particular reason that ACL's aren't = and !=?  Secondly, anyone have a good example to look at for the hooks username_1 mentions?  I don't get enough practice to be a real coder, but I can copy and paste!  
  
  ---
  
  