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.
Thinking "dependency injection" models. For its long history, node_access_acquire_grants() has called node_access_write_grants(). That doesn't seem proper. The act of "acquiring" is not the same as the act of "writing".
Separating those functions out and issuing a proper return of $grants would also give us more API flexibility.
Done properly, it might also allow for swappable storage to satisfy the noSQL folks, as discussed in #1819726: Move node access code into a pluggable class
Comment | File | Size | Author |
---|---|---|---|
#4 | 1825984-separate-node_access.patch | 3.6 KB | agentrickard |
#2 | 1825984-separate-node_access.patch | 3.2 KB | agentrickard |
Comments
Comment #1
agentrickardThis is likely part of the entity access overhaul. Tagging.
Comment #2
agentrickardPatch for the 'bot.
Might make sense to make these methods on the Entity controller.
Comment #4
agentrickardRe-roll to fix the special case of node_access_rebuild().
Comment #5
agentrickardWe can turn this into proper methods once #1696660: Add an entity access API for single entity access lands.
Comment #6
agentrickardSuperseded by #1921426: [Followup] Move node access storage to DIC
Comment #7
agentrickardReopening.
Comment #8
agentrickardThis looks to have been done in \Drupal\node\NodeAccessController