From f1fa021847459a015d933edf8519b0498025014f Mon Sep 17 00:00:00 2001 From: Civiware Solutions Date: Fri, 29 Jun 2018 01:18:15 +0530 Subject: [PATCH] Added permission --- batchexportperm.php | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/batchexportperm.php b/batchexportperm.php index f3f5fee..5b42bbf 100644 --- a/batchexportperm.php +++ b/batchexportperm.php @@ -134,30 +134,15 @@ function batchexportperm_civicrm_entityTypes(&$entityTypes) { _batchexportperm_civix_civicrm_entityTypes($entityTypes); } -// --- Functions below this ship commented out. Uncomment as required. --- - /** - * Implements hook_civicrm_preProcess(). + * Implements hook_civicrm_permission(). * - * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_preProcess - * -function batchexportperm_civicrm_preProcess($formName, &$form) { - -} // */ - -/** - * Implements hook_civicrm_navigationMenu(). - * - * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_navigationMenu - * -function batchexportperm_civicrm_navigationMenu(&$menu) { - _batchexportperm_civix_insert_navigation_menu($menu, 'Mailings', array( - 'label' => E::ts('New subliminal message'), - 'name' => 'mailing_subliminal_message', - 'url' => 'civicrm/mailing/subliminal', - 'permission' => 'access CiviMail', - 'operator' => 'OR', - 'separator' => 0, - )); - _batchexportperm_civix_navigationMenu($menu); -} // */ + * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_permission + */ +function deleterelationships_civicrm_permission(&$permissions) { + $prefix = ts('CiviCRM') . ': '; + $permissions['edit exported contributions'] = [ + $prefix . ts('Edit exported contributions'), + ts('Edit exported contributions'), + ]; +}