Skip to content
Snippets Groups Projects
Commit 0963b6a4 authored by dpi's avatar dpi
Browse files

Adding cache tags to registration access controller.

parent 7e14fe34
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,12 @@ entity.event_type.edit_form: ...@@ -7,13 +7,12 @@ entity.event_type.edit_form:
route_name: entity.event_type.edit_form route_name: entity.event_type.edit_form
base_route: entity.event_type.edit_form base_route: entity.event_type.edit_form
title: 'Edit' title: 'Edit'
weight: 20 weight: -100
entity.event_type.access_defaults: entity.event_type.access_defaults:
route_name: entity.event_type.access_defaults route_name: entity.event_type.access_defaults
base_route: entity.event_type.edit_form base_route: entity.event_type.edit_form
title: 'Access Defaults' title: 'Access Defaults'
weight: 20
# Registrations # Registrations
entity.registration.canonical: entity.registration.canonical:
......
...@@ -126,7 +126,7 @@ class RegistrationAccessControlHandler extends EntityAccessControlHandler { ...@@ -126,7 +126,7 @@ class RegistrationAccessControlHandler extends EntityAccessControlHandler {
return $return_as_object ? $result : $result->isAllowed(); return $return_as_object ? $result : $result->isAllowed();
} }
return $return_as_object ? AccessResult::allowed() : TRUE; return $return_as_object ? AccessResult::allowed()->addCacheableDependency($event) : TRUE;
} }
catch (InvalidEventException $e) { catch (InvalidEventException $e) {
return $fail; return $fail;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment