From abbf7b482f28fa5e61e81199f45f07510d9b3d4a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 11 Nov 2013 14:49:37 -0800 Subject: [PATCH] Smarty - Export $crmPermissions object for use in all templates --- CRM/Core/Smarty.php | 2 ++ CRM/Core/Smarty/Permissions.php | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 CRM/Core/Smarty/Permissions.php diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index 6422ca2c48..c88b450ee9 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -160,6 +160,8 @@ class CRM_Core_Smarty extends Smarty { $this->register_function('crmURL', array('CRM_Utils_System', 'crmURL')); $this->load_filter('pre', 'resetExtScope'); + + $this->assign('crmPermissions', new CRM_Core_Smarty_Permissions()); } /** diff --git a/CRM/Core/Smarty/Permissions.php b/CRM/Core/Smarty/Permissions.php new file mode 100644 index 0000000000..377c10898a --- /dev/null +++ b/CRM/Core/Smarty/Permissions.php @@ -0,0 +1,9 @@ +