Problem/Motivation
Service 'access_check.node.add' is removed in D10.
Steps to reproduce
With this module installed on D10, clearing and rebuilding Drupal caches leads to the error:
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
The service "epub_reader_framework.reader_publication_form_alter" has a dep
endency on a non-existent service "access_check.node.add". Did you mean one
of these: "access_check.default", "access_check.theme", "access_check.node
.preview"?
Proposed resolution
Replace with a check against the node access handler, retrieved from the entity_type storage.
$access_check = $this->entityTypeManager
->getAccessControlHandler('node');
if ($access_check->createAccess('reader_chapter', $user, [], FALSE)) {..}
Comments
Comment #3
joshhytr commentedComment #6
scott_euser commentedLooks great thanks! I am going to merge this into dev and test more thoroughly with your merge requests combined