<page_callback>CRM_Financial_Page_FinancialType</page_callback>
<desc>Formerly civicrm_contribution_type merged into this table in 4.1</desc>
<adminGroup>CiviContribute</adminGroup>
- <access_arguments>administer CiviCRM Financial Types</access_arguments>
<weight>580</weight>
</item>
<item>
*/
class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
+ /**
+ * Set variables up before form is built.
+ */
+ public function preProcess() {
+ // Check permission for Financial Type when ACL-FT is enabled
+ if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()
+ && !CRM_Core_Permission::check('administer CiviCRM Financial Types')
+ ) {
+ CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ }
+ parent::preProcess();
+ }
+
/**
* Build the form object.
*/
* Browse all financial types.
*/
public function browse() {
+ // Check permission for Financial Type when ACL-FT is enabled
+ if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()
+ && !CRM_Core_Permission::check('administer CiviCRM Financial Types')
+ ) {
+ CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ }
// get all financial types sorted by weight
$financialType = array();
$dao = new CRM_Financial_DAO_FinancialType();