Is it possible to define a new operation for a node access?
As I know, the operations for a node that are used in hook_access()
are:
create
delete
update
view
I have a custom content type for which I need another operation, such as "suggest."
Is it possible to define a new operation for a node access?
As I know, the operations for a node that are used in hook_access()
are:
create
delete
update
view
I have a custom content type for which I need another operation, such as "suggest."
short answer is NO as node_access() who is responsible to call hook_access() does a check on the $op parameter
you can attach some extra info to the node object in your suggest() function - hopefully called before node_access() - then check these extra informations in your hook_access() and return TRUE/FALSE according.
another option consists in hardcode permission checks into the suggest() action itself without messing around with hook_access.