Currently, on enabling or disabling this module, all nodes are set into the {node_access} table with the realm 'domain_id' and gid of '0'.

This is expected, as domain_node_access_records issues that realm as a default in the case that no options are selected. However, the UI allows users to set the "Send new content to all affilates' option, which suggests that we should set the realm 'domain_site' and 'gid' 0 instead.

I can't see, from the API, how to check the condition: If we are rebuilding the node access table, use this default IF this settings is active.

We may not be able to change it. The best option may be to include a function to "update all nodes to domain_site access."

Comments

agentrickard’s picture

Perhaps we set an enabling function similar to the disabling function.

http://api.drupal.org/api/function/node_access_example_disabling/5.

Yup. It works.

agentrickard’s picture

Status: Active » Reviewed & tested by the community

There are now two defined variables at the top of the module, which control how node_access() records are re-written when the module is first installed.

Instructions are in the README. Code to be committed later today.

agentrickard’s picture

Done. This is in the beta release.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)