Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2219023-10-flood-integration.patch | 14.43 KB | TR |
#2 | 2219023-rules-flood-integration.patch | 2.47 KB | Dave Reid |
#1 | 2219023-rules-flood-integration.patch | 2.46 KB | Dave Reid |
Comments
Comment #1
Dave ReidComment #2
Dave ReidRevised patch that fixes the hook name for system's rules_condition_info.
Comment #3
TR CreditAttribution: TR commentedI'm not against this, but the patch only contains the definition of the action and condition. There is no implementation of the condition or the action, and there is no code to trigger the events. So it seems pretty useless to me as-is. Is this related to https://www.drupal.org/project/flood_control ? Would it be more appropriate to put it in that module instead of in core Rules?
Comment #4
TR CreditAttribution: TR commentedComment #5
TR CreditAttribution: TR commentedI just discovered code in https://www.drupal.org/sandbox/mparker17/2974572 which does this. It would have been nice if it were shared here in Rules ...
Comment #6
Dave ReidThe Flood API is part of core. Conditions are implemented by whatever uses the flood API, like Honeypot. See https://www.drupal.org/project/honeypot/issues/2218537#comment-8581267 for how it could be implemented from another module.
Comment #7
TR CreditAttribution: TR commentedComment #8
TR CreditAttribution: TR commentedMoving to D8RE.
Comment #9
TR CreditAttribution: TR commentedComment #10
TR CreditAttribution: TR commentedRemoved some dead code that was accidentally left in there.
This patch provides one condition, "FloodIsAllowed", and two actions "FloodClearEvent" and "FloodRegisterEvent".
There is also a Kernel test which tests all these conditions and actions separately.
Comment #11
TR CreditAttribution: TR commentedI will fix the 1 coding standard (unused use) on commit, not worth rolling another patch for it.
Comment #13
TR CreditAttribution: TR commentedCommitted.