I am setting up a relatively simple website using Drupal 8. There are several different content types. Within each content type I would like some content to be available to anonymous users and some only available to authenticated users (i.e. 'member only' content).
I would like to add a simple tick box field that would control whether the content was publicly available or not. i.e. if the field is ticked then it is available to anyone but if it isn't ticked then it is only available to members.
I have managed to get some way to achieving this by using Node View Permissions and creating a duplicate of each content type - both have the same fields but one is visible to anonymous users and the other is only visible to authenticated users. This works, but isn't very satisfactory because it requires duplicate content types. I would prefer to have a single content type with a field that controls view permissions.
Do you have any suggestions?