3

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?

4
  • 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? Commented Feb 6, 2020 at 12:59
  • 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.
    – Marko
    Commented Feb 6, 2020 at 15:07
  • 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
    – Kboy
    Commented Feb 6, 2020 at 18:04
  • 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.
    – Marko
    Commented Feb 7, 2020 at 10:58

4 Answers 4

4

As per Erik's 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.

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 ([email protected]).

1
  • 1
    Thank you for the response. I will try to do this myself over the weekend and report back on Monday.
    – Marko
    Commented Feb 7, 2020 at 10:55
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.

1
  • 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.
    – Marko
    Commented Feb 6, 2020 at 15:00
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.

1
  • 1
    I was thinking of using the same approach if all else fails. The civirules way seems cleaner, though.
    – Marko
    Commented Feb 7, 2020 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.