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

Manage Groups selector includes empty rows for groups that user does not have permission for

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      If you go to Manage Groups when logged in as a user who has permission to only a subset of all groups (based on ACLs) - the selector shows empty rows for the non-permitted groups. You can see this on the sandbox by logging in as:

      user = acltest
      pw = demo

      ... and then going to Manage Groups (http://sandbox.civicrm.org/civicrm/group?reset=1)

      I think this is side-effect of the partially implemented child group feature. If you look at the $rows array passed to Group/Page/Group.tpl - you'll see that the non-permitted group items are empty EXCEPT for the "children" element. In example below - group 1 is a non-permitted group for this user:

      1 => Array (1)
      children => empty
      4 => Array (12)
      id => 4
      domain_id => 1
      name => Advisory Board
      title => Advisory Board
      is_active => 1
      visibility => Public User Pages and Listings
      where_clause => ( `civicrm_group_contact-4`.group_id...
      select_tables => a:10:{s:15:"civicrm_contact";i:1;s:15...
      where_tables => a:2:{s:15:"civicrm_contact";i:1;s:25:...
      group_type => Access Control, Mailing List
      action => <a href="http://localhost/dgg/drupal/...
      children => empty

        Attachments

          Activity

            People

            • Assignee:
              sunil Sunil Pawar
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: