CiviCRM
  1. CiviCRM
  2. CRM-6341

Only the first 50 groups can appear in "Manage Groups" if ACLs are used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.5, 3.2
    • Fix Version/s: 4.3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      For some users, only a small number of groups or no groups at all appear in the "Manage Groups" page. It turns out that any group that appears is the first 50 groups as ordered by group.title.

      Cause of the problem is a LIMIT clause in the relevant SQL. A patch against v3.2 will be included
      1. CRM-6341-patch.diff
        0.6 kB
        Rob Thorne
      2. CRM-6341-patch-2.diff
        2 kB
        Rob Thorne
      3. CRM-6341-patch-3.diff
        2 kB
        Rob Thorne

        Activity

        Hide
        Dave Jenkins added a comment -
        Rob - thanks for the patch. I tested on a 4.0.7 site and it works correctly both for ACL'd users and users with "edit all contacts" perm. My guess would have been that both "edit all contacts" and "view all contacts" perms are relevant, as IIRC either will circumvent contact & group ACLs, however I tested as a user with "view all contacts" but not "edit all contacts" and this worked correctly too.

        Eileen - have you tested on other versions in the meantime? All OK?

        Core team - any reason not to reopen this issue & review/commit the patch?

        Cheers, Dave J
        Show
        Dave Jenkins added a comment - Rob - thanks for the patch. I tested on a 4.0.7 site and it works correctly both for ACL'd users and users with "edit all contacts" perm. My guess would have been that both "edit all contacts" and "view all contacts" perms are relevant, as IIRC either will circumvent contact & group ACLs, however I tested as a user with "view all contacts" but not "edit all contacts" and this worked correctly too. Eileen - have you tested on other versions in the meantime? All OK? Core team - any reason not to reopen this issue & review/commit the patch? Cheers, Dave J
        Hide
        Donald A. Lobo added a comment -

        eileen, dave:

        can u'll agree on this patch and if so commit for 4.3 please

        thanx

        lobo
        Show
        Donald A. Lobo added a comment - eileen, dave: can u'll agree on this patch and if so commit for 4.3 please thanx lobo
        Hide
        Eileen McNaughton added a comment -
        This is obviously pretty old now & I can't remember if it's running on our site still - but it looks fundamentally sensible to me - I *think* that the CRM_ACL_API::group function might return early / have sensible handling if the edit all contacts permission exists so the if-then handling may be unnecessary.

        I think we should commit this fix
        Show
        Eileen McNaughton added a comment - This is obviously pretty old now & I can't remember if it's running on our site still - but it looks fundamentally sensible to me - I *think* that the CRM_ACL_API::group function might return early / have sensible handling if the edit all contacts permission exists so the if-then handling may be unnecessary. I think we should commit this fix
        Hide
        Eileen McNaughton added a comment -
        OK - so I tried to look at applying this & the code has been heavily rewritten - it appears to me this is probably fixed in trunk as a result of one of these. (It's not possible to apply the patch as the surrounding code has been completely changed)

        http://issues.civicrm.org/jira/browse/CRM-9497
        http://issues.civicrm.org/jira/browse/CRM-9155
        Show
        Eileen McNaughton added a comment - OK - so I tried to look at applying this & the code has been heavily rewritten - it appears to me this is probably fixed in trunk as a result of one of these. (It's not possible to apply the patch as the surrounding code has been completely changed) http://issues.civicrm.org/jira/browse/CRM-9497 http://issues.civicrm.org/jira/browse/CRM-9155
        Hide
        Eileen McNaughton added a comment -
        Per discussions with Dave J - the code has 'moved' on since this was logged & the patch (& hopefully the problem) no longer seem to apply
        Show
        Eileen McNaughton added a comment - Per discussions with Dave J - the code has 'moved' on since this was logged & the patch (& hopefully the problem) no longer seem to apply

          People

          • Assignee:
            Eileen McNaughton
            Reporter:
            Rob Thorne
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development