This depends on #2095125: Use access constants in every access control context, which introduces access checking constants on EntityInterface. Node.module has its custom NODE_ACCESS_* constants. Replace those with the ones on NodeInterface.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Assigned: Xano » Unassigned
Status: Active » Needs review
FileSize
6.07 KB
Xano’s picture

Xano’s picture

Issue tags: +API change

Tagging.

Berdir’s picture

We NodeInterface? they work the same for all entity types now..

Xano’s picture

The return value uses NodeInterface, and so does the $node parameter. People won't have to look further, which is a possibility when we document the return value using AccessInterface.

I thought this would be a DX improvement, but if others agree, I don't mind documenting the return value using AccessInterface instead.

Xano’s picture

2: drupal_2112023_2.patch queued for re-testing.

Xano’s picture

Issue summary: View changes
FileSize
6.02 KB

Status: Needs review » Needs work

The last submitted patch, 7: drupal_2112023_7.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review

7: drupal_2112023_7.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 7: drupal_2112023_7.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review

7: drupal_2112023_7.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 7: drupal_2112023_7.patch, failed testing.

The last submitted patch, 7: drupal_2112023_7.patch, failed testing.

Xano’s picture

Title: Replace NODE_ACCESS_* with EntityInterface access constants » Remove hook_node_access() in favor of hook_ENTITY_TYPE_access()
Status: Needs work » Needs review
FileSize
9.2 KB

Now we have hook_ENTITY_TYPE_access(), hook_node_access() is nothing more than a particular version of that hook. As such, remove any reference to it. Replacement of the NODE_ACCESS_* constants with those of \Drupal\Core\Access\AccessInterface remains part of this issue, as they were only ever used for hook_node_acces() anyway.

Status: Needs review » Needs work

The last submitted patch, 14: drupal_2112023_14.patch, failed testing.

Xano’s picture

Xano’s picture

Status: Needs work » Closed (duplicate)