Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Berdir on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.3.x
Introduced in version:
9.3.0
Issue links:
Description:
The _node_add_access check has been deprecated in favor of the already existing generic entity checks.
Note that the _node_add_access check could optionally be used with a bundle, there are two separate replacements, either to check access for any bundle or a specific bundle.
Example changes:
@@ -13,7 +13,7 @@ node.add_page:
options:
_node_operation_route: TRUE
requirements:
- _node_add_access: 'node'
+ _entity_create_any_access: 'node'
node.add:
path: '/node/add/{node_type}'
@@ -21,7 +21,7 @@ node.add:
_controller: '\Drupal\node\Controller\NodeController::add'
_title_callback: '\Drupal\node\Controller\NodeController::addPageTitle'
requirements:
- _node_add_access: 'node:{node_type}'
+ _entity_create_access: 'node:{node_type}'
options:
_node_operation_route: TRUE
parameters:
Impacts:
Module developers