From b8758b4bff49dc16af523bccb4b5f34d9f5eb55a Mon Sep 17 00:00:00 2001 From: Edsel Date: Tue, 16 Feb 2016 17:01:50 +0530 Subject: [PATCH] CRM-16526 CIVI-3 Added exception for creating line item / contribution if even one is non-permissioned ---------------------------------------- * CRM-16526: ACLs for Financial Types https://issues.civicrm.org/jira/browse/CRM-16526 --- api/v3/LineItem.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/v3/LineItem.php b/api/v3/LineItem.php index 4badcf3ae9..463aab2b88 100644 --- a/api/v3/LineItem.php +++ b/api/v3/LineItem.php @@ -63,7 +63,9 @@ function civicrm_api3_line_item_create($params) { $params = CRM_Contribute_BAO_Contribution::checkTaxAmount($params, TRUE); return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } - return civicrm_api3_create_success(array()); + else { + throw new API_Exception('You do not have permission to create this line item'); + } } /** -- 2.25.1