I want to change permissions for nodes by hook_node_access_records()
and hook_node_grants()
, but I want to allow access to a node only if the workflow access module has granted access to it.
something like:
if (workflow_access_allowed() && myModule_allowed()) {
allow()
}
else {
disallow()
}
How do I check wheather workflow_access has already granted access to node? (My module priority in grants array in hook_node_access_records()
is higher than the workflow access module.