AUL module contains API and UI for node access system. AUL module can be useful in your project when content access logic is not simple.

AUL(Access User Lists) is very similar to the ACL(Access Control Lists). The difference that AUL creates access per user and adds nodes to it(ACL works vice versa. It creates grand per node and adds users).

You don't want to create lots of grants per each user because it slows page load and causes long queries. With AUL you can create for example just 3 realms for each user (one for view, one for edit, one for delete) and than add nodes to your AUL.
Using AUL we move our big list of access realms("locks") in node_access table. But hook_node_access_records will work quickly and we won't have long queries with access conditions because we manipulate only with few grant IDs ("keys").

All you need to do to assign grants:

// Step 1. Assign target grants.
$grants = array(
  'view' => 1,
  'update' => 1,
  'delete' => 1,
);
aul_add_aul($uid, $nid, $grants);

// Step 2. Rebuild grants for the node.
node_access_acquire_grants($node);

Thanks to Shademan and Spleshka for contributing the ideas.

Supporting organizations: 
Sponsors of initial development

Project information

Releases