- Issue created by @lukas.fischer
- 🇩🇪Germany jurgenhaas Gottmadingen
This is a great idea. Here are a few comments:
- This should go into the eca_user submodule, we don't need an eca_session submodule, I guess
- Why should we require a new plugin type? Sounds like the functionality required can be done with the existing action plugins, and maybe conditions and events
- When it comes to events, that's not that simple: events need to be dispatched by Drupal core at the point where you want someone else being allowed to subscribe to. So, when core wants to dispatch an event when a session is being created or destroyed, then core needs to provide that event and dispatch it. Once that's available, ECA will then be able to subscribe to those events. For now, I don't think, Drupal core allows that to happen, does it? There is an event
AccountEvents::SET_USER
which is dispatched when the current user is being set. - The action plugins listed above all make sense and should be fairly easy to implement.
Sessions are something very delicate and it's probably easy to build something with security implications. So, we should be very careful with them, but the use cases are great and we should certainly go for it.