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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Issue tags: +Entity Access

This is likely part of the entity access overhaul. Tagging.

agentrickard’s picture

Status: Active » Needs review
FileSize
3.2 KB

Patch for the 'bot.

Might make sense to make these methods on the Entity controller.

Status: Needs review » Needs work

The last submitted patch, 1825984-separate-node_access.patch, failed testing.

agentrickard’s picture

Status: Needs work » Needs review
FileSize
3.6 KB

Re-roll to fix the special case of node_access_rebuild().

agentrickard’s picture

We can turn this into proper methods once #1696660: Add an entity access API for single entity access lands.

agentrickard’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)
agentrickard’s picture

Status: Closed (duplicate) » Active

Reopening.

agentrickard’s picture

Status: Active » Closed (duplicate)

This looks to have been done in \Drupal\node\NodeAccessController