Fix financial acl permissions to respect check_permissions
authoreileen <emcnaughton@wikimedia.org>
Wed, 24 Apr 2019 04:20:17 +0000 (16:20 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 24 Apr 2019 04:20:17 +0000 (16:20 +1200)
commit40ae908c05e12bd70b66f7746f2138674036e83e
tree742bce22697dcce47332c63e67975e3d5bc89d4c
parent6eca48d05313acc8deb75207bbd2145c67d1e633
Fix financial acl permissions to respect check_permissions

This enables a test whereby check_permissions is passed in & fixes by following the todo. It also removes
a couple of lines whereby the permissions are double-added in the contribution where clause - but
only if a field for which no special handling exists -we should rely on the main initialize function
(& over time make the inclusion more generic & consistent with our selectWhere approach) to avoid
1) unnecessary joins
2) ignoring the check_permission flag
CRM/Contact/BAO/Query.php
CRM/Contribute/BAO/Query.php
tests/phpunit/api/v3/FinancialTypeACLTest.php