From 20ab1502262c7eca8bb357fd1caca8e2b805072e Mon Sep 17 00:00:00 2001 From: naomi Date: Sun, 13 May 2018 12:46:17 +0200 Subject: [PATCH] Add-case form counts as "case context" --- modules/opencase_entities/src/OCActorAccessControlHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/opencase_entities/src/OCActorAccessControlHandler.php b/modules/opencase_entities/src/OCActorAccessControlHandler.php index 1484e08..cf1a8ae 100644 --- a/modules/opencase_entities/src/OCActorAccessControlHandler.php +++ b/modules/opencase_entities/src/OCActorAccessControlHandler.php @@ -23,7 +23,7 @@ class OCActorAccessControlHandler extends EntityAccessControlHandler { /** @var \Drupal\opencase_entities\Entity\OCActorInterface $entity */ $bundle = $entity->bundle(); $route_name = \Drupal::routeMatch()->getRouteName(); - $case_routes = ['entity.oc_case.canonical', 'entity.oc_case.edit_form', 'view.cases.page_1']; + $case_routes = ['entity.oc_case.canonical', 'entity.oc_case.edit_form', 'view.cases.page_1', 'entity.oc_case.add_form']; $is_case_context = in_array($route_name, $case_routes); switch ($operation) {