Node access based on condition I'm adding an event list to a website and I want to limit what anonymous users see based on a field value, a checkbox "Private event". If the checkbox is marked then only a subset of the fields for the given event are shown. Furthermore, after a year of the event I want all fields to become visible to anonymous users. I took a look at the Access Control module but couldn't find a way to have this conditional type of access to fields. Is there another module that I could use?
I would do like this:


Define a new 'Restricted' View mode. Either manually with hook_entity_info_alter or with Display Suite.
Create a new Page in Page manager, using the by default available Node view.
Create two separate variants in the page.

The first one will use a selection rule on ´Role: Anonymous´ and ´Field Private event: True´. In this Variant, display the node with the 'Restricted' view mode.
The second variant will not need a selection rule, as it will be the fall through option. Here you show the node with the normal 'Full' view mode.



For making everything visible after a year , it sounds like either a hook_cron with some code in it, or perhaps a combination of some Rules with a VBO, which would flip the private field off after a year. Sounds like that might be a separate question though.