From 4cdc90e9c1ea5d822cbfa3d94f6f1d66a2ff2d23 Mon Sep 17 00:00:00 2001 From: David Hayes Date: Tue, 20 Sep 2016 16:28:48 -0500 Subject: [PATCH] fix previous permission check --- CRM/Event/Page/EventInfo.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index 9323108134..66c96ebb20 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -242,11 +242,13 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { $this->assign('mapURL', $mapURL); } - $statusTypes = CRM_Event_PseudoConstant::participantStatus(NULL, 'is_counted = 1', 'label'); - $statusTypesPending = CRM_Event_PseudoConstant::participantStatus(NULL, 'is_counted = 0', 'label'); - $findParticipants['statusCounted'] = implode(', ', array_values($statusTypes)); - $findParticipants['statusNotCounted'] = implode(', ', array_values($statusTypesPending)); - $this->assign('findParticipants', $findParticipants); + if (CRM_Core_Permission::check('view event participants')) { + $statusTypes = CRM_Event_PseudoConstant::participantStatus(NULL, 'is_counted = 1', 'label'); + $statusTypesPending = CRM_Event_PseudoConstant::participantStatus(NULL, 'is_counted = 0', 'label'); + $findParticipants['statusCounted'] = implode(', ', array_values($statusTypes)); + $findParticipants['statusNotCounted'] = implode(', ', array_values($statusTypesPending)); + $this->assign('findParticipants', $findParticipants); + } $participantListingID = CRM_Utils_Array::value('participant_listing_id', $values['event']); if ($participantListingID) { -- 2.25.1