Problem/Motivation
Currently there's the option to exclude logged in users. The more flexible Drupal-way would be to include / exclude roles or even better use Conditions API like we for example did in the Posthog Module:
https://www.drupal.org/project/posthog
Also see https://www.drupal.org/project/drupal/issues/3506721
Comments
Comment #2
firflantI wonder how big impact it will add to the site load in comparison to authenticated role checker. I would like to keep this module lightweight
Comment #3
anybodyYeah absolutely your choice as maintainer :)
Still a role selection would be more typical than just authenticated.
The "exclude on admin paths" option should be separate from that, I think and should use https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Routing%2... technically IMHO.
Comment #4
firflant