I have a content type with multiple fields. Some of the fields are accessible to everyone and there are other fields for which the access is controlled.
Example: There is a content type called Reports with fields like title, summary, body etc. Title and summary should be visible to everyone but the access to body field is controlled.
For implementing this I need to have 2 view modes. one of them will have the fields title and summary displayed with the rest of the fields hidden. The other view mode will have only the body field visible. I am planning to implement the hook hook_node_access to derive the access permissions for the node. So how can I get the view mode in this hook so that I can have my access check based on the view mode.