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.

#1945390: Convert book_admin_edit to a new-style FormInterface implementation
#1966334: Convert user_access to User::hasPermission()

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alan Evans’s picture

Status: Active » Needs review
FileSize
3.18 KB

Initial patch for discussion/early feedback/sanity checking ...

xjm’s picture

Component: node.module » node system
Issue summary: View changes

(Merging "node system" and "node.module" components for 8.x; disregard.)

jhedstrom’s picture

Status: Needs review » Closed (duplicate)

I think this has been accomplished already, or at least partially, with #1947880: Replace node_access() by $entity->access().