CRM-15148 fix api to pass check_permissions
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 19 Aug 2014 23:42:41 +0000 (11:42 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 20 Aug 2014 01:06:53 +0000 (13:06 +1200)
this results in core acls but NOT hook acls being applied IF check_permissions=1
prior to this patch core acls but NOT hook acls were applied even if check_permissions =0

api/v3/utils.php

index 252f44947935a8ea18a06354922ccc7f5e88cfdd..873d60995efa4de0d5d4638545271dc13e1ac7b2 100644 (file)
@@ -518,7 +518,8 @@ function _civicrm_api3_get_query_object($params, $mode, $entity) {
 
   $newParams = CRM_Contact_BAO_Query::convertFormValues($inputParams);
   $query = new CRM_Contact_BAO_Query($newParams, $returnProperties, NULL,
-    FALSE, FALSE, $mode
+    FALSE, FALSE, $mode,
+    empty($params['check_permissions'])
   );
   list($select, $from, $where, $having) = $query->query();