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

Allow non-admins to find and merge duplicates


    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.5
    • Fix Version/s: 3.2.1
    • Component/s: Core CiviCRM
    • Labels:


      Currently, CiviCRM limits finding and merging of duplicate records to users with the "Administer CiviCRM" permission. A recent thread on the forums points out that some organizations will want to allow that privilege to non-administrative users. Having a need for this myself, I'd like to contribute to building this feature, and I'm hoping the changes will make it into core at some point.

      I believe the heart of the matter is to expand access to two CiviCRM paths: civicrm/admin/deduperules and civicrm/admin/dedupefind.

      My basic proposal is to create new permissions for each of these paths by doing something like this:

      1. Change these paths to civicrm/contact/deduperules and civicrm/contact/dedupefind, which probably means moving the path definitions out of Admin.xml and into Contact.xml.
      2. Add permissions for "Administer dedupe rules" and "Merge duplicate contacts" and tie these to the respective actions.
      3. In the CiviCRM "black bar" menu, move the "Find and Merge Duplicate Contacts" menu item from "Admin > Manage > Find and Merge Duplicate Contacts" to "Contacts > Find and Merge Duplicate Contacts".

      There may be some issues with ACLs: since this feature currently belongs only to admin, does the code for merging duplicates even bother checking ACLs? If not, we'd need to add that checking, in which case my proposal would be to honor ACLs by:
      1. checking for dupes only among those contacts that are visible to the current user, and
      2. merging duplicates only where both contacts are deletable by the current user.

      I've posted essentially the same idea in this blog post <http://civicrm.org/blogs/allenshaw/allowing-non-admins-find-and-merge-duplicates>, with positive feedback and so far no caveats were raised.
      This is also based on a forum thread here: http://forum.civicrm.org/index.php/topic,11636.msg59614.html#msg59614

      Any comments on implementation, caveats, or specific tips on how I should proceed (you know, like "how we do things around here") would be appreciated.


        1. dedupe_2.patch
          443 kB
          Allen Shaw
        2. dedupe.patch
          442 kB
          Allen Shaw



            • Assignee:
              ashwini Ashwini Poharkar
              allenshaw Allen Shaw
            • Votes:
              1 Vote for this issue
              1 Start watching this issue


              • Created: