From b19a01c7a5a211d2af20497526888fd648a83e7c Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 15 Jul 2015 01:37:23 +0530 Subject: [PATCH] --ICM-15, added status bounce when none financial type is permissioned --- CRM/Contribute/Form/Contribution.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 12506a1c89..2eae1df0e4 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -621,7 +621,9 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP // Check permissions for financial type first CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, 'add'); - + if (empty($financialTypes)) { + CRM_Core_Error::statusBounce(ts('You do not have all the permissions needed for this page.')); + } $financialType = $this->add('select', 'financial_type_id', ts('Financial Type'), array('' => ts('- select -')) + $financialTypes, -- 2.25.1