Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.8
-
Fix Version/s: 4.7.9
-
Component/s: None
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
I'm hitting permissions issues on the job.process_batch_merge using drush & using tests.
The issue is that the 'check_permissions' flag is not passed through when calculating the dupes. This means that it is necessary to set a user when calling the function. Arguably that is not a bad thing - but by the same token we have the 'check_permissions' flag standardised in CiviCRM & I feel it should be respected.
Solving it in the context of WMF unit tests is the other option (drush is obviously not a hard one to solve). Unfortunately WMF tests, unlike core tests, need to use drupal as the UF as they are using drupal modules.
Looking at the code ... adding permission details into the cacheKey could potentially avoid leakage too. It seems like if the cache is filled by a permissioned user a non-permissioned user would have those results returned to them