Problem/Motivation

Hard blocking implemented by this module seems to be very similar to what Drupal Core 8+ does with its flood service.
I guess that when this module was developed for Drupal 7, that didn't exist.
See https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Flood%21F...

The core flood service provides support of flood event tracking, freeing the module from maintain its own database table and much of the current logic.

In addition to that, the user login form make use of this service, so the module might take additional advantage of it, see how UserLoginForm::validateAuthentication works.

So we should discuss how to better integrate with Core's flood functionality and extend it with this module's helpful functionality like notifications, settings, etc. for hard blocking.

Edit: I just saw, that the module already has a dependency on drupal:ban module, so perhaps parts of this already use the core flood functionality. This has to be researched.

Steps to reproduce

Set a login_security limit that's lower than the one from Core Flood and see that not

Proposed resolution

  1. Find and write down differences here
  2. Make a plan for integration and discuss it
  3. Implement
  4. Test
  5. Release

That may for example include:

  • Remove duplicate functionality from this module and instead refer to flood_control for settings and unblocking
  • If possible, extend the core flood functionality
  • Ensure that additional functionality like messages, soft-blocking and other features are preserved

Remaining tasks

User interface changes

API changes

Data model changes

Comments

manuel.adan created an issue. See original summary.

shrop’s picture

I think next steps for this would be to create a plan on what would need to change in Login Security for D8:

Which functions would get replace or modified?
Which UI elements would be affected and how?
Are there ways to illustrate how the flow of Login Security would work, clarifying which parts are custom contrib code vs relying on Core APIs?
How would this affect any automated tests?

Also, it would be good to have detail on how the applicable Core APIs work.

From there we can discuss LOE and discuss the value of future changes.

Anybody’s picture

Version: 8.x-1.x-dev » 2.x-dev
Anybody’s picture

Title: Use the flood service » Use the Core Flood Service
Issue summary: View changes
Anybody’s picture

Title: Use the Core Flood Service » Use the Core Flood Service instead of modules custom implementations
Anybody’s picture