I'd like to change the ownership of a node before it loads on the edit page to essentially transfer ownership of a node from one person to another. My goal is to give multiple users access to a single node.
This hook should be used to add information that is not in the node or node revisions table, not to replace information that is in these tables (which could interfere with the entity cache).
So unfortunately I can't use those hooks.
I noticed that hook_node_prepare allows you to "act on a node about to be shown on the add/edit form", however, it looks like the node access hook already runs before that hook does, because I run into an "access denied" message.
My goal was to avoid having to control access to the node, and instead, just transfer ownership so that it can defer access control to the currently installed node access module (Taxonomy Access) and the "Edit Own Content" permission. I didn't want to add more custom logic or additional node access modules on top of our existing access modules because it's already complex as it is and not recommended.
Is this the right approach or should I just cave and use hook_node_access (or some other access hook)? I'm worried about the implications of adding another layer of node access to our already complex system, but if it's the best way to do it, I will.