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) »
  • ACLs and Smart Groups problem
Pages: [1]

Author Topic: ACLs and Smart Groups problem  (Read 1355 times)

P a u l

  • Guest
ACLs and Smart Groups problem
November 26, 2014, 06:38:20 pm
I am using 4.5.4, and wordpress 4.

I can't get smart groups to work with a wordpress login. I want chapter admin logins to only be able to see their members. I've set up roles, ACLs, smart groups, and nothing works so far.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: ACLs and Smart Groups problem
November 26, 2014, 06:50:20 pm
Could you be about 100 times more specific about what you've tried, with screenshots.
Try asking your question on the new CiviCRM help site.

P a u l

  • Guest
Re: ACLs and Smart Groups problem
November 26, 2014, 08:18:57 pm
Quote from: Coleman Watts on November 26, 2014, 06:50:20 pm
Could you be about 100 times more specific about what you've tried, with screenshots.

Call the target chapter ChapterA...

1. create wordpress role "ChapterA Staff". Give it all capabilities for now.
 
2. create wordpress account "ChapterA Staff". Assign the ChapterA Staff role.

3. create new group: ChapterA Staff (normal group) and add ChapterA Staff account added in step 2, then create group "ChapterA Members" (smart group, based on search criteria for ChapterA members). Verify smart group works.

4. CiviCRM » Administer CiviCRM » Option Groups » Access Control » Manage ACL Roles: create role "ChapterA Staff".

5. CiviCRM » Administer CiviCRM » Access Control » WordPress Access Control: allow ChapterA Staff various permissions, including View all contacts

6. CiviCRM » Manage ACLs » Access Control » Assign Users to Roles: assign the ChapterA Staff user to the ChapterA Staff role.

7. CiviCRM » Manage ACLs » Access Control » Manage ACLs: create the permission for ChapterA Staff role to edit the smart group ChapterA Members.

Now login as ChapterA Staff, and see that searching on contacts results in all contacts, not restricted to ChapterA Members. The expected result is that the ChapterA Staff login will only see ChapterA Members. Similar result on a member search, you see all members. If I unselect "View all contacts" in the access control, I see no contacts or members at all. So based on the above, I don't think I have set it up correctly, or there is some problem with the software.
« Last Edit: November 26, 2014, 08:46:14 pm by P a u l »

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: ACLs and Smart Groups problem
November 29, 2014, 05:28:28 pm
A couple of questions:
* Can you confirm this works correctly with a non-smart group as the ACL target?
* If you take the same steps on the Drupal demo site (http://demo.civicrm.org) do you get the same results?

I have definitely used smart groups as the target of an ACL before - and distinctly remember when support for that did NOT exist, in the Civi 4.2 days.  So I can confirm that what you're doing SHOULD work...
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

P a u l

  • Guest
Re: ACLs and Smart Groups problem
November 30, 2014, 08:57:33 am
Quote from: JonGold on November 29, 2014, 05:28:28 pm
A couple of questions:
* Can you confirm this works correctly with a non-smart group as the ACL target?
* If you take the same steps on the Drupal demo site (http://demo.civicrm.org) do you get the same results?

I have definitely used smart groups as the target of an ACL before - and distinctly remember when support for that did NOT exist, in the Civi 4.2 days.  So I can confirm that what you're doing SHOULD work...

I replaced the smart group with a static group of members (the only change) in "CiviCRM » Manage ACLs » Access Control » Manage ACLs", and the ACL feature worked immediately. This is very interesting. Now I need to learn why the smart group is not working. To me this is like the LocNess monster of features -- people say they have seen it, but no one has proof. I need step by step known good procedures.

Days ago I read the a section of the book that made a parenthetical comment about this working only on Drupal. I need to find that section again.

I have had a few suggestions to test bugs on the demo site. Well, you can't test payment gateway workflows because you can't set up payment gateways on the demo. And you can't test the ACL issue on the wordpress or drupal demos because you can't create users.

(To test this out further, I set up CiviCRM with Drupal on my own server and after a day or so was finally able to get to the CiviCRM menus. Then after a few more hours on Drupal, I was completely unable to create a new admin user that had access to any admin menus. Drupal is completely obscure to me, and I can usually figure stuff out. I have been a software engineer for over 30 years, and couldn't figure out Drupal. So I have not been able to test this on Drupal.)

I filed this as a bug: CRM-15662.




« Last Edit: November 30, 2014, 11:26:45 am by P a u l »

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: ACLs and Smart Groups problem
November 30, 2014, 01:06:14 pm
For reference, this is the original bug: https://issues.civicrm.org/jira/browse/CRM-10135
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

P a u l

  • Guest
Re: ACLs and Smart Groups problem
November 30, 2014, 02:05:54 pm
Quote from: JonGold on November 30, 2014, 01:06:14 pm
For reference, this is the original bug: https://issues.civicrm.org/jira/browse/CRM-10135

Thank you. I feel this is not really fixed.

BTW, the workaround posted by Peter Davis in CRM-10135 does not work for me.
« Last Edit: November 30, 2014, 02:13:51 pm by P a u l »

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: ACLs and Smart Groups problem
November 30, 2014, 03:21:13 pm

1. might want to check the thread here: http://forum.civicrm.org/index.php/topic,34919.msg148602.html#msg148602

might have some tips

2. giving "view all contacts" will defitely override any acl's since thats an all inclusive permissioning

3. would be good if you can see how this works in drupal and then debug in wordpress. We need more folks testing and submitting patches for the WP integration

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

P a u l

  • Guest
Re: ACLs and Smart Groups problem
November 30, 2014, 04:38:19 pm
Quote from: Donald Lobo on November 30, 2014, 03:21:13 pm

1. might want to check the thread here: http://forum.civicrm.org/index.php/topic,34919.msg148602.html#msg148602

might have some tips

2. giving "view all contacts" will defitely override any acl's since thats an all inclusive permissioning

3. would be good if you can see how this works in drupal and then debug in wordpress. We need more folks testing and submitting patches for the WP integration

lobo

Thank you. "view all contacts" is really not in play here as I have tried it both ways. The ACL permissions definitely work for static groups but not for smart groups. In my opinion...

I studied the thread you refer to and can't understand it. They refer to testing on the demo site, and as I have already said, it is not possible to test there since you will not have control over new users or permissions.

And also as I said, Drupal is way beyond my understanding. My project for the non-profit is Wordpress only. I have promised to set this up for the organization that I belong to, and so far, I can't fix this. Perhaps they can hire an expert.

I will certainly add anything I find that is relevant, and I support your efforts.


« Last Edit: November 30, 2014, 04:45:39 pm by P a u l »

diegov

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
    • dotPro Tecnologia e Comunicação
  • CiviCRM version: 4.3.5
  • CMS version: Joomla! 3.1.x
  • MySQL version: 5.3
  • PHP version: 5.3
Re: ACLs and Smart Groups problem
December 09, 2014, 11:43:10 am
Hi, I have the exact same issue here, with Civi 4.5.4 and Joomla! 3.3.6. Confirmed that the same ACL works fine with standard groups and doesn't with smart groups. I tried the re-saving as mentioned in the Issue 10135 and it didn't make any difference.

I find a message (http://forum.civicrm.org/index.php/topic,34174.msg144933.html#msg144933) about a script to sync groups (Smart with Standard group) to make it possible to alleviate the problem, unfortunately it's for Drupal only.

P a u l

  • Guest
Re: ACLs and Smart Groups problem
December 15, 2014, 07:03:51 pm
I filed this as issue CRM-15662, which is now marked as fixed. It's starting to looked fixed to me after applying the one line fix. I had to start over with a new user, role, smart group, and acl, to get it to work.

« Last Edit: December 15, 2014, 10:02:27 pm by P a u l »

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

This forum was archived on 2017-11-26.