CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Problems with Smart Group and ACL
Pages: [1]

Author Topic: Problems with Smart Group and ACL  (Read 1948 times)

jake.mw

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
    • PeaceWorks Technology Solutions
Problems with Smart Group and ACL
March 04, 2012, 07:47:27 pm
I have upgraded from 4.0.8 to 4.1.1.  Previously I had configured some ACL's so that certain users can only access contacts that are in the "Volunteer" group.  Everything was working fine while the "Volunteer" group was just a regular group: those users with the specific ACL permissions were able to view all the "volunteer" contacts, and no others.

Now that contacts can have multiple subtypes, I changed things around so that Volunteer is now a contact sub-type.  This allows me to attach specific custom data to "volunteer" contacts only.  I then deleted the old "volunteer" group and created a smart group consisting of all contacts of sub-type "volunteer".

After updating the ACL permissions to use the new smart group as the target group, rather than the old conventional group, users that could previously view the "volunteer" contacts are now being denied permission to view and edit.

If I go to Manage Groups and view all the contacts belonging to the smart group, I see all the volunteer contacts that I expect.

It appears that ACLs are not working when the set of target contacts is a smart group rather than a conventional group.  Other forum posts suggest that it was, at one point, possible to use a smart group as a target group... so I'm wondering if I have done something wrong, or if a bug has been introduced?

Thanks so much for any help you can provide.

Tchiot Galopin

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.44
  • PHP version: 5.3.3.7
Re: Problems with Smart Group and ACL
April 29, 2012, 04:41:35 pm
Surprising... I've the same problem with CiviCRM 4.1.2.
It seems that ACL permissions are just working with regular groups. Did you find an answer?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problems with Smart Group and ACL
April 29, 2012, 07:30:49 pm

can you post the steps you did to implement the below, i.e. the sequence of UI steps would be good so we know what u did etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Tchiot Galopin

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.44
  • PHP version: 5.3.3.7
Re: Problems with Smart Group and ACL
April 30, 2012, 07:31:35 am
Thank you. Here are the followed steps:
  • Creation of a smart group (called "Group A"), by means of an advanced search
  • Creation of a regular group (called "Group B"), which will contain those people who can access group "Group A"
  • Creation of a Drupal role (called "Role C") and selection of desired administration rights
  • Assignation of Drupal role "Role C" to the user associated to the contact (called "Contact D"). Addition of  "Contact D" to CiviCRM "Group B".
  • Creation of an ACL role (called "Role E") in CiviCRM
  • Assignation of ACL role "Role E" to group "Group B"
  • Creation of the ACL (called "ACL F") which is assigned to role "Role E", authorized to "View" a "group of contacts", as the data type. The viewable group is "Group A".
When I connect as user "Contact D", no contacts are viewable. However, if I replace the smart group "Group A" by any regular group in the ACL section, contacts become viewable.
« Last Edit: April 30, 2012, 10:29:57 am by Tchiot Galopin »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problems with Smart Group and ACL
April 30, 2012, 08:05:52 pm

i've committed a patch for this. It should be available here:

http://issues.civicrm.org/jira/browse/CRM-10135?page=com.atlassian.jirafisheyeplugin:fisheye-issuepanel#issue-tabs

in an hour or so from now.

However u will need to rebuild your smart groups for this patch to work. There was a bug introduced in the way we stored information in the 4.1 release

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Tchiot Galopin

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.44
  • PHP version: 5.3.3.7
Re: Problems with Smart Group and ACL
May 08, 2012, 03:05:22 pm
Good evening,
I completely forgot to thank you after you have proposed the patch. Everything works perfectly since its implementation.
Thank you very much!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Problems with Smart Group and ACL

This forum was archived on 2017-11-26.