entity.menu_position_rule.add_form route should use _entity_create_access requirement
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3584280. -->
Reported by: [prudloff](https://www.drupal.org/user/3611858)
Related to !18
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The entity.menu_position_rule.add_form route requires a permission explicitly.<br>
It is a better practice to use the _entity_create_access requirement, this way access can be altered with hook_entity_create_access.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Add this hook:</p>
<div class="codeblock">
<pre><span style="color: #000000"><span style="color: #0000BB"><?php<br></span><span style="color: #FF8000">/**<br> * Implements hook_entity_create_access().<br> */<br></span><span style="color: #007700">function </span><span style="color: #0000BB">test_entity_create_access</span><span style="color: #007700">() {<br> return </span><span style="color: #0000BB">AccessResult</span><span style="color: #007700">::</span><span style="color: #0000BB">forbidden</span><span style="color: #007700">();<br>}<br></span><span style="color: #0000BB">?></span></span></pre></div>
<p>You can still create menu position rules.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Replace the _permission requirement with _entity_create_access.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
> Related issue: [Issue #3561626](https://www.drupal.org/node/3561626)
issue