Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6348

CRM_ACL_BAO_ACL::whereClause should call hook aclGroups BEFORE it calls aclWhereClause.

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 3.1.5, 3.2
    • Fix Version/s: 4.3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Some calls to the alphabetical pager take literally hours for users with many (~50) ACLs. CRM_ACL_BAO_ACL::whereClause can be used to simplify the where clause, but you have to parse lots of raw SQL to do this.

      Since sometimes a smaller set of ACLs is equivalent to the bigger set (say, if every contact in 49 of the ACLs is contained in a "master" ACL that covers all the other 49 groups), it would help to call CRM_Utils_Hook:aclGroup during the call to CRM_ACL_BAO_ACL::whereClause(), after the call has calculated $ids, but before it starts pumping out SQL.

      Use case for this is in the forums: http://forum.civicrm.org/index.php/topic,14165.0.html

      Attached file is a patch against v3.2.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              torenware Rob Thorne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: