hook_entity_access() and hook_entity_create_access() have not been converted to use the \Drupal\Core\Access\AccessInterface constants yet. The conversion also makes NODE_ACCESS_* constants obsolete, so remove those and update the corresponding documentation, which includes references to hook_node_access(), which no longer exists.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Title: hook_entity_access() and hook_entity_create_access() must use the AccessInterface constants » Entity and field access hooks must use the AccessInterface constants
Status: Active » Needs review
FileSize
13.82 KB

Let's see if I got them all.

Status: Needs review » Needs work

The last submitted patch, 1: drupal_2151219_1.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
13.82 KB

Status: Needs review » Needs work

The last submitted patch, 3: drupal_2151219_3.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
8.89 KB
23.02 KB

I merged #2112023: Remove hook_node_access() in favor of hook_ENTITY_TYPE_access() into this, as using the AccessInterface constants makes the NODE_ACCESS_* obsolete, and then the hook_node_access() documentation would be so incoherent and out of place, that it made sense to me to make the whole thing consistent in one patch.

Xano’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 5: drupal_2151219_5.patch, failed testing.

Berdir’s picture

Status: Needs work » Closed (duplicate)

This is obsolete with the AccessResult changes.