if ($id) {
unset($params['entity_id'], $params['entity_table']);
}
- if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) {
+ if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && CRM_Utils_Array::value('check_permissions', $params)) {
if (empty($params['financial_type_id'])) {
throw new Exception('Mandatory key(s) missing from params array: financial_type_id');
}
* Array of matching line_items
*/
function civicrm_api3_line_item_get($params) {
- if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) {
+ if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && CRM_Utils_Array::value('check_permissions', $params)) {
CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types);
if (empty($params['financial_type_id'])) {
$params['financial_type_id'] = array('IN' => array_keys($types));
* API result array
*/
function civicrm_api3_line_item_delete($params) {
- if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) {
+ if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && CRM_Utils_Array::value('check_permissions', $params)) {
CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types, CRM_Core_Action::DELETE);
if (empty($params['financial_type_id'])) {
$params['financial_type_id'] = civicrm_api3('LineItem', 'getvalue', array(