Answers.Body: <p>As per <a href="https://civicrm.stackexchange.com/users/134/erikh-civicoop">Erik's</a> suggestion I created a new condition. 
  It will be included in the next version of civirules (2.12).
  If you would like to get it before the official release of the new version you can always get it from the civirules repo <a href="https://lab.civicrm.org/extensions/civirules" rel="nofollow noreferrer">https://lab.civicrm.org/extensions/civirules</a> .</p>
  
  <p>The new condition is called "Contact added by Contact (not) in Group(s)" and it lets you ask if the contact was made by someone in the specified group. My original question was about the specific contact, but the group implementation makes more sense and works better for the ACL functionality which was missing. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-09T22:20:31.663Z
Answers.LastActivityDate: 2020-02-09T22:26:28.810Z
Answers.LastEditDate: 2020-02-09T22:26:28.810Z
Answers.UserDisplayName: Marko
Answers.Body: <p>You are correct that there is currently no condition to check if a contact was added by a specific user. It would not be too much work (estimate about 2 hours) to add that condition to CiviRules. It would be nice if you would be able to do this, alternatively if you would be happy to fund this drop me a mail (erik.hommel@civicoop.org).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T10:55:54.217Z
Answers.Text: Thank you for the response. I will try to do this myself over the weekend and report back on Monday.
Answers.UserDisplayName: Marko
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-06T16:45:04.740Z
Answers.LastActivityDate: 2020-02-06T16:45:04.740Z
Answers.UserDisplayName: ErikH - CiviCooP
Answers.Body: <p>A workaround for the unavailable condition could be that the user adds a tag to a contact they add. This tag could then be the triggering condition for the Rule to add that contact to the specified group.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-06T15:00:28.310Z
Answers.Text: But then the user could just as easily add them to the group itself in the same form. Why use tag as intermediary at all? This would be useful if I could setup something up that would automatically tag every created contact by some user.
Answers.UserDisplayName: Marko
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-06T12:41:03.017Z
Answers.LastActivityDate: 2020-02-06T12:41:03.017Z
Answers.UserDisplayName: joxley
Answers.Body: <p>We are having the same issue and our dirty workaround to prevent errors was to create a tiny extension that adds a formrule. The rule is checking if a group has been selected when an unprivileged user modifies a contact, but only works for the regular contact form.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T11:00:39.267Z
Answers.Text: I was thinking of using the same approach if all else fails. The civirules way seems cleaner, though.
Answers.UserDisplayName: Marko
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T09:45:24.393Z
Answers.LastActivityDate: 2020-02-07T09:45:24.393Z
Answers.UserDisplayName: Thomas Schüttler
Body: <p>Just what it says in the title. I have an issue with ACL where the user that has access to only one group creates a New Individual (through civicrm) winch then they do not have the access to.</p>
  
  <p>My thinking was to create a rule where upon adding a Contact it gets added to a group of my choosing, with the condition that the contact was created by a specific user. That condition doesn't exist in CiviRules, as far as I can tell. </p>
  
  <p>EDIT
  To make it clear. A user, when creating a contact, can assign the contact to the group they have access to, but this isn't user friendly and feels burdensome. Isn't there an automated way to do this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-06T12:59:17.620Z
Comments.Text: What and how would the contact move to another group if the user that added them for some reason is no longer a system user? As per answer below, a tag, may work, or if the user that adds them is also able to add relationships it may be worth looking at a relevant one (e.g. group coordinator) and using those for the smart group criteria?
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-06T15:07:01.290Z
Comments.Text: There is no problem with users adding contact with a specific group for ACL. But this seems like an unnecessary step. It makes it more complicated from a user perspective, and if they forget (which is likely), they don't have access to that contact. Further, there are some forms like adding participant or adding an activity which allow for a quick contact creation, which lack the tag and group options. I edited the question.
Comments.UserDisplayName: Marko
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-06T18:04:30.677Z
Comments.Text: Can you can create a a contact subtype and in combination with Civirule linked condition "In one of selected subtypes " then add to group. you may have to test, if this works, then i will add as an answer but best solution seems to be that suggested by @ErikH
Comments.UserDisplayName: Kboy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-07T10:58:39.067Z
Comments.Text: This is a nice workaround, but feels like a big structural change for the contact database to implement for the organisation in question. I agree that the new condition is the way to go.
Comments.UserDisplayName: Marko
Tags: <groups><acl><civirules>
Title: Assign all contacts created by a user to one group automatically?
ThreadText: # Assign all contacts created by a user to one group automatically?
  
  (Asked by: username_0 on 2020-02-06)
  
  Just what it says in the title. I have an issue with ACL where the user that has access to only one group creates a New Individual (through civicrm) winch then they do not have the access to.
  
  My thinking was to create a rule where upon adding a Contact it gets added to a group of my choosing, with the condition that the contact was created by a specific user. That condition doesn't exist in CiviRules, as far as I can tell.
  
  EDIT
  To make it clear. A user, when creating a contact, can assign the contact to the group they have access to, but this isn't user friendly and feels burdensome. Isn't there an automated way to do this?
  
  **Tags:** groups, acl, civirules
  
  > **Comments:**
  > **username_1**: What and how would the contact move to another group if the user that added them for some reason is no longer a system user? As per answer below, a tag, may work, or if the user that adds them is also able to add relationships it may be worth looking at a relevant one (e.g. group coordinator) and using those for the smart group criteria?  
  > **username_0**: There is no problem with users adding contact with a specific group for ACL. But this seems like an unnecessary step. It makes it more complicated from a user perspective, and if they forget (which is likely), they don't have access to that contact. Further, there are some forms like adding participant or adding an activity which allow for a quick contact creation, which lack the tag and group options. I edited the question.  
  > **username_2**: Can you can create a a contact subtype and in combination with Civirule linked condition "In one of selected subtypes " then add to group. you may have to test, if this works, then i will add as an answer but best solution seems to be that suggested by @username_3  
  > **username_0**: This is a nice workaround, but feels like a big structural change for the contact database to implement for the organisation in question. I agree that the new condition is the way to go.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_0 on 2020-02-09. Score: 4 | Accepted answer
  
  As per [Erik's](https://civicrm.stackexchange.com/users/134/username_3-username_3) suggestion I created a new condition.
  It will be included in the next version of civirules (2.12).
  If you would like to get it before the official release of the new version you can always get it from the civirules repo <https://lab.civicrm.org/extensions/civirules> .
  
  The new condition is called "Contact added by Contact (not) in Group(s)" and it lets you ask if the contact was made by someone in the specified group. My original question was about the specific contact, but the group implementation makes more sense and works better for the ACL functionality which was missing.
  
  
  ---
  
  ### Answer by username_3 on 2020-02-06. Score: 3
  
  You are correct that there is currently no condition to check if a contact was added by a specific user. It would not be too much work (estimate about 2 hours) to add that condition to CiviRules. It would be nice if you would be able to do this, alternatively if you would be happy to fund this drop me a mail (erik.hommel@username_3.org).
  
  > **Comments:**
  > **username_0**: Thank you for the response. I will try to do this myself over the weekend and report back on Monday.  
  
  ---
  
  ### Answer by username_4 on 2020-02-06. Score: 1
  
  A workaround for the unavailable condition could be that the user adds a tag to a contact they add. This tag could then be the triggering condition for the Rule to add that contact to the specified group.
  
  > **Comments:**
  > **username_0**: But then the user could just as easily add them to the group itself in the same form. Why use tag as intermediary at all? This would be useful if I could setup something up that would automatically tag every created contact by some user.  
  
  ---
  
  ### Answer by username_5 on 2020-02-07. Score: 1
  
  We are having the same issue and our dirty workaround to prevent errors was to create a tiny extension that adds a formrule. The rule is checking if a group has been selected when an unprivileged user modifies a contact, but only works for the regular contact form.
  
  > **Comments:**
  > **username_0**: I was thinking of using the same approach if all else fails. The civirules way seems cleaner, though.  
  
  ---
  
  