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) »
  • Access CiviMember not correct when using ACL's
Pages: [1]

Author Topic: Access CiviMember not correct when using ACL's  (Read 3784 times)

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Access CiviMember not correct when using ACL's
October 27, 2007, 12:43:05 pm
I am setting up Drupal user rights and CiviCRM ACL's.

I made 5 specific Drupal users, User A - User E (I don’t use Drupal's anonymous user and authenticated user). All users have their specific rights.

I made 5 Groeps for Acces Control (Grp A- Grp E) and made ACL Roles, ACL A - ACL E.
I did give them a weight number: 1 to ACL A, 2 to ACL B, ..., 5 to ACL E, where 1 is less important then 5. I noticed that a larger weight number overrules a smaller number. (Is that correct  ???).
I assigned Drupal users to ACL roles: User A -> ACL A, User B -> ACL B,.......

So I have 5 users (5 access groups and 5 acl roles) with increasing value of access rights: User A (low) - User E  (high).

In Drupal:
I give ‘access to CiviCRM’ and ‘add contacts’ to all the users.

In ACL:
I make some permissions for groups in Manage ACL's

Perfect: this is all working fine!! All the Users (A - E) have there own group access.
---------------------------------------------------------------------

Then in Drupal:
I give Access to CiviContribute and CiviMember to User C
I give access to Civimail to user D

When user C clicks on CiviMember in the dashboard main menu the browser is freezing, searching for page... and after a while I get a blank page. I did a few test and noticed that my server load goes extremely high. I have no error notifications.

It looks like a memory problem. I increased the php memory to 80M (default = 64M), did not help.

I switched of all the ACL's, that did help: User C gets his Members page (Membership Summary). In this screen, clicking on a membership members count  (to show the members of the members type) the result is a (find members) page with an incorrect count of members and an incorrect overview of members. In real: I have 1 membership type with 11 members. It shows 1 member and the count is 48 members  ??? When logged in as admin (id 1) the overview is correct.

Switching off the ACL’s is not an option (because of the different group access rules for all the users), and I want to give user C the access to CiviMember.
The access to CiviContribute to User C and CiviMail to User D gives no problem (I am not yet ready with this setup but it looks ok).

I checked the Civimember count on the test site http://demo.civicrm.org/drupal/civicrm/member?reset=1 .
I noticed that the total counts 2007-new/renew and totals current# in the member type table where 17 and 10. When I clicked on these totals the count and overview was 20 and 12. Normally these counts must be the same.


msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Access CiviMember not correct when using ACL's
November 01, 2007, 07:58:48 pm
So, I spend a lot of hours reading on this site, testing and ... no results. I can't get ACL get to working correct.
I had my (hosting) serverload in red and going down for 2 times.
 
What I have is:
The first ACL role (with rules) is going fine. When I make the second ACL role operational, I notice a high serverload and slow reaction of CiviCRM view a group, sometimes ending with a white screen. I think the problem is in groups having different ACL rules in different roles. Testing the third ACL role with such a group lets the server goes down. My other (Drupal)sites on the same server (domain) are still operational.

When I switch on the Drupal acces 'view or edit contacts': viewing groups is going fast because Drupal is overruling CiviCRM. I cannot use this because some of the groups must be hidden for some roles/users.

I need some help to make ACL work...

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: Access CiviMember not correct when using ACL's
November 01, 2007, 11:20:46 pm

are smart groups involved in your ACL? Due to limitation with mysql (and our lack of knowledge about it apriori), smart groups and acl's are not very efficient (or to put it more blunty, they are extremely inefficient!). So i would recommend doing acl's on static groups only for medium-large sized sites. We hope to rectify this issue by restructuring search and working around mysql inefficiencies (the sub-select optimization is still not present in mysql 5.x :(

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

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Access CiviMember not correct when using ACL's
November 02, 2007, 03:25:46 am
Hallo Lobo,

Thank yoy for your reply.
Do you recognize critical ACL/mysql issues in the setup, written below?

My groups are:
21 static groups and 1 smart group
The smart group is not used in the ACL rules.
There is 1 static group marked as 'mailing list' wich is used in ACL.
There are 5 static groups marked as Access Control.
And I use 1 profile in ACL rules with the command 'everybody can edit the profile'.

My problems are pointing me to the group 'mailing list' or/and the staticgroup I made for Drupal Users.  This group has different acl roles/drupal access and is using the profile (admin is making users, there is no open access.)

I work with Drupal 5.3, MySQL 4.1.22 and PHP 5.2.

Regards,
Martin
(transferring this ACL test from hosting server to local xampp,
and thinking about how to avoid ACL's ..)



msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Access CiviMember not correct when using ACL's
November 02, 2007, 03:29:02 am
Forget to mention: The database has less then 800 contacts.

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Access CiviMember not correct when using ACL's
November 04, 2007, 01:32:13 pm
I made some tests on a xampp server.

A configuration with more than 5 usable CiviCRM (static)groups for an ACL role gives an unacceptable server load when listing (a view or edit) groupmembers. The problems are related to the amount of groups for roles. I could not find relations in Group Types.

Drupal acces 'view or edit contacts' solves this, the problem is that ACL's are useless with Drupal acces configured: a Drupal user (=CiviCRM role) is viewing all the groups, you cannot hide 'Acces Control' Group Types or have a view/edit choice for different roles/users.

Also I noticed an inconsistent in rules: It was possible to make a view rule for role 1 and an edit rule for role 2 with group A. For group B the edit rule overruled the view rule.   

At the moment this is my (life) solution for this issue: one role (and drupal user) has acces with ACL roles and 2 drupal users have acces with Drupal's edit contacts. It is not optimal.

When ACL is working correct it is a powerful acces management tool. Because of the relation with an important part of CiviCRM, the groups, please consider the restructuring of search and working around mysql inefficiencies in V2.x

My advice to others: don't use ACL. When you have to use it: first test the ACL configuration on a local test server. Be carefull with more then 5 groups for an ACL role.
 
Regards
Martin
 

 

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: Access CiviMember not correct when using ACL's
November 04, 2007, 07:42:33 pm

msn:

can u send me a copy of your civicrm 1.9 database along with all the ACLs etc. I'd like to figure out see the queries generated and what we can do to optimize them. Would be great if we can chat on IM / IRC and run thru your scenarios, whats happening and why

you can email it to me at donald.lobo at gmail. I'll destroy it when i'm done with it, will respect its confidentiality etc

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

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: Access CiviMember not correct when using ACL's
November 11, 2007, 06:14:22 pm

Some of the wrong counts could be attributed to this issue:

http://issues.civicrm.org/jira/browse/CRM-2404

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

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Access CiviMember not correct when using ACL's
November 30, 2007, 05:44:29 pm
Hello Lobo,

Because I had other activities the previous weeks, I was not able to react.

I know of the bug CRM-2404. If I eliminate ACL however, the counting is correct. At this moment, with a few groups in ACL the counting is also correct. Therefore my idea is that the bug is related to ACL use.

I have sent you a copy of our database and want to ask you if you had time to analyse the db and can you make some conclusions?

Regards
Martin

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Access CiviMember not correct when using ACL's

This forum was archived on 2017-11-26.