From 8d0a0fd0360c1e6436ed65198d7ee41af063130c Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 9 Feb 2017 14:44:41 +1300 Subject: [PATCH] CRM-19934 improvement on acl cache. This change means that when we are checking the allow function we do not add the harmful OR to the query. The 'view my contact' & 'edit my contact' permissions have already been checked for. Adding them into the ACL query with an OR causes serious performance issues, as elsewhere commented. We can & should avoid it here --- CRM/Contact/BAO/Contact/Permission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Contact/Permission.php b/CRM/Contact/BAO/Contact/Permission.php index 3948de9dd8..a37e40e7f8 100644 --- a/CRM/Contact/BAO/Contact/Permission.php +++ b/CRM/Contact/BAO/Contact/Permission.php @@ -170,7 +170,7 @@ WHERE contact_id IN ({$contact_id_list}) $tables = array(); $whereTables = array(); - $permission = CRM_ACL_API::whereClause($type, $tables, $whereTables); + $permission = CRM_ACL_API::whereClause($type, $tables, $whereTables, NULL, FALSE, FALSE, TRUE); $from = CRM_Contact_BAO_Query::fromClause($whereTables); $query = " -- 2.25.1