Commit d837a605 authored by Nicolò Caruso's avatar Nicolò Caruso

Use the new 'view calendar data events' permissions

parent ecbf21f7
......@@ -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')) {
// Get the event type definition from Drupal
$bat_event_type = bat_event_type_load($type);
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