Commit 7ecf9f11 authored by Rich's avatar Rich

Add permission and apply it to menu item (but needs check on api4)

parent e7b4303d
......@@ -151,7 +151,7 @@ function actionlinks_civicrm_navigationMenu(&$menu) {
'label' => E::ts('Action Links'),
'name' => 'actionlinks_admin',
'url' => 'civicrm/a#/actionlinks',
'permission' => 'administer civicrm',
'permission' => 'administer action links extension',
'operator' => 'OR',
'separator' => 0,
));
......@@ -166,6 +166,12 @@ function actionlinks_civicrm_container($container) {
array(\Civi\Token\Events::TOKEN_EVALUATE, 'actionlinks_evaluate_tokens')
);
}
/**
* Define a permission for administering this.
*/
function actionlinks_civicrm_permission(&$permissions) {
$permissions['administer action links extension'] = E::ts('Administer Action Links Extension');
}
/**
* Add tokens the new way.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment