diff --git a/core/modules/node/src/NodeAccessControlHandler.php b/core/modules/node/src/NodeAccessControlHandler.php index c8c450b..63f77fd 100644 --- a/core/modules/node/src/NodeAccessControlHandler.php +++ b/core/modules/node/src/NodeAccessControlHandler.php @@ -111,10 +111,10 @@ protected function checkAccess(EntityInterface $node, $operation, $langcode, Acc // Check for the "edit any BUNDLE" or "delete any BUNDLE" permission. $type_id = $node->getType(); - if ($operation === 'update' && $account->hasPermission("edit any $type_id content")) { + if ($operation === 'update' && $account->hasPermission("edit any {$type_id} content")) { return AccessResult::allowed()->cachePerPermissions()->cachePerUser()->cacheUntilEntityChanges($node); } - if ($operation === 'delete' && $account->hasPermission("delete any $type_id content")) { + if ($operation === 'delete' && $account->hasPermission("delete any {$type_id} content")) { return AccessResult::allowed()->cachePerPermissions()->cachePerUser()->cacheUntilEntityChanges($node); } diff --git a/core/modules/node/src/Tests/NodeAccessGrantsTest.php b/core/modules/node/src/Tests/NodeAccessGrantsTest.php index cab6364..67a3b59 100644 --- a/core/modules/node/src/Tests/NodeAccessGrantsTest.php +++ b/core/modules/node/src/Tests/NodeAccessGrantsTest.php @@ -11,7 +11,8 @@ use Drupal\user\RoleInterface; /** - * Tests basic node_access functionality with one implementation of hook_node_grants(). + * Tests basic node_access functionality with one implementation of + * hook_node_grants(). * * @group node */