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.
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.
Comment | File | Size | Author |
---|---|---|---|
#14 | drupal_2112023_14.patch | 9.2 KB | Xano |
Comments
Comment #1
XanoComment #2
Xano#2095125: Use access constants in every access control context has been committed.
Comment #3
XanoTagging.
Comment #4
BerdirWe NodeInterface? they work the same for all entity types now..
Comment #5
XanoThe 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.
Comment #6
Xano2: drupal_2112023_2.patch queued for re-testing.
Comment #7
XanoRe-roll because of #2108829: Make AccessManager stricter with values returned from access checkers.
Comment #9
Xano7: drupal_2112023_7.patch queued for re-testing.
Comment #11
Xano7: drupal_2112023_7.patch queued for re-testing.
Comment #14
XanoNow 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 theNODE_ACCESS_*
constants with those of\Drupal\Core\Access\AccessInterface
remains part of this issue, as they were only ever used forhook_node_acces()
anyway.Comment #16
XanoMarking as duplicate of #2151219: Entity and field access hooks must use the AccessInterface constants.
Comment #17
Xano