Support creation of API driven content entities
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3375899. -->
Reported by: [hydra](https://www.drupal.org/user/647364)
Related to !512
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Currently it is not possible to create content entities, which don't implement a custom access handler. If so, the following code will prevent the entity from being created:<br>
NewEntity.php:147</p>
<pre> elseif (!$this->entityTypeManager->hasHandler($entity_type_id, 'access')) {<br> $access_result = AccessResult::forbidden('Cannot determine access without an access handler.');<br> }</pre><p>Modules like <a href="https://www.drupal.org/project/message">message</a> are using a content entity, which has no user interface and no custom access handler - and even though they would have, the next part of the NewEntity's access method will check the "createAccess" which by default checks for a permission, not existing in such modules.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>- Install the message and message_example module<br>
- Create an ECA workflow which creates a message for instance after creating a node. Caution, the message_example module does this aswell via hook_node_insert<br>
- Verify that the message entity by ECA is not created, the one by message_example on the other side is</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Change default behaviour when checking access when creating content entities. Instead of denying the access, we should grant it since this seems to be the default behaviour in drupal core wen using plain entity API to create such entiites.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Discuss how to support content entities without custom access handlers.</p>
> Related issue: [Issue #3348425](https://www.drupal.org/node/3348425)
issue