Commit 3e01eb24 authored by nicola85's avatar nicola85

Export service_providers

parent d29f7485
uuid: 129c489d-2746-4f73-8a00-b5a95f6e1ab2
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: WZbAUfLEza2a6pmLTvWFp8syuYjkdqLIDg3c9Pvt9YA
default_config_hash: QkKAtBvm2PHW7oGbO8C-kN_wSU3KGNPQvRRtWLmVhiI
id: bat_api
label: 'Bat api'
service_providers:
'events_index:calendar-events': 'events_index:calendar-events'
'unit_index:calendar-units': 'unit_index:calendar-units'
'entity_delete:property': 'entity_delete:property'
'entity_delete:property_type': 'entity_delete:property_type'
'entity_delete:event': 'entity_delete:event'
......
......@@ -14,6 +14,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\bat_unit\Entity\TypeBundle;
/**
......@@ -85,7 +86,7 @@ class UnitIndex extends ServiceDefinitionBase implements ContainerFactoryPluginI
$return_children = TRUE;
$create_event_access = FALSE;
if (bat_event_access(bat_event_create2(array('type' => $event_type)), 'create', \Drupal::currentUser())) {
if (bat_event_access(bat_event_create2(array('type' => $event_type)), 'create', \Drupal::currentUser()) == AccessResult::allowed()) {
$create_event_access = TRUE;
}
......
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