diff --git a/bat_api.module b/bat_api.module index bd05105ff830ad596be1c55e9bbfce16df9ed773..50991be35251f94969653dc66b3a59f7a5335da9 100644 --- a/bat_api.module +++ b/bat_api.module @@ -658,6 +658,11 @@ function bat_api_services_events_index_calendar($unit_ids, $unit_types, $start_d $events_json = array(); foreach ($types as $type) { + // Check if user has permission to view calendar data for this event type. + if (!user_access('view calendar data for any ' . $type . ' event')) { + continue; + } + // Get the event type definition from Drupal $bat_event_type = bat_event_type_load($type);