Set default access permissions for some roles in VAPN module
Issue:
You installed the Views access per node (VAPN) module and activated it on node bundles from type 'my_bundle'. By default, no one except admin has now access to the nodes anymore. (If you are upgrading VAPN from earlier versions, this happens only to nodes that dont have any rolle assigned).
But you would like the restrictions to be "opt-in". By default everything should be accessible and only certain bits of content shall be restricted.
Prerequisites:
Solution:
- Alter forms that are enabled for vapn and set "anonymous" and "authenticated" as the default for new nodes.
- Implement a deploy hook that sets these permissions as a default to all exsting nodes - if no roles already assigned - in my case only from type "my_bundle".