Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.12
-
Fix Version/s: 4.7.14
-
Component/s: None
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
The 'View My Contact' permission results in a horrifically inefficient query for contacts who also have ACL access as it appends this permission as an 'OR'. We can partially fix this without too much work by altering the CRM_Contact_BAO_Contact_Permission::cache function to request the $whereClause without this clause added and to manage the caching of it itself. This still leaves us stuck when the cache is bypassed but it addresses a serious performance gotcha affecting some sites