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.
Problem/Motivation
Following on from http://drupal.org/node/1945390#comment-7247250 with further detail in http://drupal.org/node/1945390#comment-7215306, we ideally want node_access to be an injectable service.
Proposed resolution
Convert node_access into a service that can be injected wherever needed.
Remaining tasks
Experimental conversion- Initial sanity check ... bail out here if needed
- Finalize conversion
- Convert all instances in code to use the new service, including test conversion
- Reviews (tests should be covered by existing tests using the new service)
- Documentation updates
User interface changes
None
API changes
All instances of node_access would be changed to the new service.
Related Issues
#1945390: Convert book_admin_edit to a new-style FormInterface implementation
#1966334: Convert user_access to User::hasPermission()
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-node-access-service-1966760-1.patch | 3.18 KB | Alan Evans |
Comments
Comment #1
Alan Evans CreditAttribution: Alan Evans commentedInitial patch for discussion/early feedback/sanity checking ...
Comment #2
xjm(Merging "node system" and "node.module" components for 8.x; disregard.)
Comment #3
jhedstromI think this has been accomplished already, or at least partially, with #1947880: Replace node_access() by $entity->access().