Implemented the hook_node_access hook