4

Is it possible to create an ACL associated with a Smart Group?

I'm attempting to create a members directory that is only accessible to members. I can't seem to get it working. Here's what I've done so far:

  • I created a Smart Group called "Active Members" that includes any member of the club (status new, current or grace).
  • I made the Group “Members” as the parent group of the Smart Group "Active Members" created above. This had the effect of making the Smart Group disappear, and when you click on the list of members of “Members” it lists everyone that matched the search criteria for the Smart Group.
  • I created an ACL Role “Member”.
  • I assigned the Group “Members” to the Role “Member”
  • I created an ACL allowing anyone with the Role “Member” to access the Profile “Directory” to perform the operation “Search”

After doing all that, I figured I had it. This was going to work, and all would be right with the world. I was wrong.

The next thing I did was to create a new ACL allowing anyone with the role “Authenticated” to access the Profile “Directory” to perform the “Search” operation. Then it worked. However, if I understand this correctly, this means anyone that logs in, regardless of their membership status, will have access to the directory.

What troubles me is that the Member Role, which is associated with the “Members” group, which appears to contain all of the active members (by way of a child Smart Group) should have allowed it to work without having to widen the scope to “Authenticated”. I’m guessing that the child group doesn’t inherit the permissions of the parent group.

I don't want to manually add my members to the group members, I want that to be automatically governed by the status of their membership, hence the use of the Smart Group.

  • Which CMS are you using? – Catorghans Apr 15 '16 at 18:09
  • Fair point. We're using WordPress 4.5 and CiviCRM 4.7.6. – Paul Dufresne Apr 15 '16 at 18:25
  • 1
    I swear we had this working last year with wordpress using civicrm ~4.5.6. It was broken in earlier versions, bug filed, fixed... it has since broken again. We can't get this to work, not even with static groups. There are bugs filed but they are not being worked on as far as I can tell. ACLs generally seem to be buggy from what I have experienced. – P a u l Apr 15 '16 at 19:26
  • Well, that's not very promising... So it's not a me just being an amateur with CiviCRM then... I was afraid I was asking a stupid question! – Paul Dufresne Apr 15 '16 at 19:27
  • 2
    See also: civicrm.stackexchange.com/questions/10064/… – P a u l Apr 15 '16 at 19:27
2

Smart Groups could be a pain in the ass in CiviCRM. They are a powerful feature but when it does not work it is hard to get it working again.

There are some alternatives to smart groups. The SQL Tasks Extension or CiviRules can add contacts to a regular group based on a Query (with SQL Tasks) or on a Trigger (with CiviRules). You can then setup this regular group as an ACL Group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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