Fix for CRM-16777
authorWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 2 Jul 2015 15:50:39 +0000 (21:20 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 10 Jul 2015 12:51:56 +0000 (18:21 +0530)
CRM/Core/xml/Menu/Admin.xml
CRM/Event/BAO/Event.php
CRM/Event/Form/ManageEvent/TabHeader.php
CRM/Event/Page/ManageEvent.php

index 632d87913e3a856f1716fefcc061fb1b7220885c..79c115eecc43ea382ff629216bc39e2d2e580c64 100644 (file)
      <title>Schedule Reminders</title>[A
      <desc>Schedule Reminders.</desc>
      <page_callback>CRM_Admin_Page_ScheduleReminders</page_callback>
+     <access_callback>1</access_callback>
+     <access_arguments>administer CiviCRM;edit all events</access_arguments>
      <adminGroup>Communications</adminGroup>
      <icon>admin/small/template.png</icon>
      <weight>40</weight>
index 64c04071de7aff74e80ed845ebc48a571f0740c5..9a4f3d2aaf9b9c4e9fc296463ebffdb23d0e8f96 100644 (file)
@@ -2030,7 +2030,7 @@ WHERE  ce.loc_block_id = $locBlockId";
         $permissions[CRM_Core_Permission::EDIT] = array_keys($allEvents);
       }
       else {
-        $permissions[CRM_Core_Permission::EDIT] = &CRM_ACL_API::group(CRM_Core_Permission::EDIT, NULL, 'civicrm_event', $allEvents, $createdEvents);
+        $permissions[CRM_Core_Permission::EDIT] = CRM_ACL_API::group(CRM_Core_Permission::EDIT, NULL, 'civicrm_event', $allEvents, $createdEvents);
       }
 
       if (CRM_Core_Permission::check('edit all events')) {
@@ -2045,7 +2045,7 @@ WHERE  ce.loc_block_id = $locBlockId";
           // at the same time also allow any hook to override if needed.
           $createdEvents = array_keys($allEvents);
         }
-        $permissions[CRM_Core_Permission::VIEW] = &CRM_ACL_API::group(CRM_Core_Permission::VIEW, NULL, 'civicrm_event', $allEvents, $createdEvents);
+        $permissions[CRM_Core_Permission::VIEW] = CRM_ACL_API::group(CRM_Core_Permission::VIEW, NULL, 'civicrm_event', $allEvents, $createdEvents);
       }
 
       $permissions[CRM_Core_Permission::DELETE] = array();
index aac6f7ca7b5a1b66529d8ec7bd36b129799618cd..a5e7ac4cc5aee4ea803486495df27fb8e2a435a3 100644 (file)
@@ -85,7 +85,7 @@ class CRM_Event_Form_ManageEvent_TabHeader {
     $tabs['location'] = array('title' => ts('Event Location')) + $default;
     $tabs['fee'] = array('title' => ts('Fees')) + $default;
     $tabs['registration'] = array('title' => ts('Online Registration')) + $default;
-    if (CRM_Core_Permission::check('administer CiviCRM')) {
+    if (CRM_Core_Permission::check('administer CiviCRM') || CRM_Event_BAO_Event::checkPermission(NULL, CRM_Core_Permission::EDIT)) {
       $tabs['reminder'] = array('title' => ts('Schedule Reminders'), 'class' => 'livePage') + $default;
     }
     $tabs['conference'] = array('title' => ts('Conference Slots')) + $default;
index 2df6673df21f21ae53a242929cc2b5b9015e5941..385d0564c1e1385b0c7b17ed38ad3cb0f38d755e 100644 (file)
@@ -137,7 +137,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'field' => 'is_online_registration',
         );
 
-      if (CRM_Core_Permission::check('administer CiviCRM')) {
+      if (CRM_Core_Permission::check('administer CiviCRM') || CRM_Event_BAO_Event::checkPermission(NULL, CRM_Core_Permission::EDIT)) {
         self::$_tabLinks[$cacheKey]['reminder']
           = array(
             'title' => ts('Schedule Reminders'),