fixed: EDIT implies VIEW
authorsystopia <endres@systopia.de>
Wed, 12 Oct 2016 20:19:12 +0000 (21:19 +0100)
committereileenmcnaugton <eileen@fuzion.co.nz>
Mon, 24 Oct 2016 02:13:29 +0000 (15:13 +1300)
CRM/Contact/BAO/Contact/Permission.php

index ebbd26562578478374c72c5d0ceb443ff4fe6628..e4ffc92d37ac9d76914e4f3b1e32653de2e5a828 100644 (file)
@@ -56,8 +56,8 @@ class CRM_Contact_BAO_Contact_Permission {
     $contact_id_list = implode(',', $contact_ids);
 
     // make sure the the general permissions are given
-    if (   $type == CRM_Core_Permission::VIEW && CRM_Core_Permission::check('view all contacts')
-        || $type == CRM_Core_Permission::EDIT && CRM_Core_Permission::check('edit all contacts')
+    if (   CRM_Core_Permission::check('edit all contacts')
+        || $type == CRM_Core_Permission::VIEW && CRM_Core_Permission::check('view all contacts')
       ) {
 
       // if the general permission is there, all good