diff --git a/modules/opencase_entities/src/OCActorAccessControlHandler.php b/modules/opencase_entities/src/OCActorAccessControlHandler.php index abc59cc..267c44d 100644 --- a/modules/opencase_entities/src/OCActorAccessControlHandler.php +++ b/modules/opencase_entities/src/OCActorAccessControlHandler.php @@ -54,8 +54,7 @@ class OCActorAccessControlHandler extends EntityAccessControlHandler { * {@inheritdoc} */ protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { - $bundle = $entity->bundle(); - return AccessResult::allowedIfHasPermission($account, "add $bundle entities"); + return AccessResult::allowedIfHasPermission($account, "add $entity_bundle entities"); } }