Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
2.46 KB
Dave Reid’s picture

Revised patch that fixes the hook name for system's rules_condition_info.

TR’s picture

Status: Needs review » Needs work

I'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?

TR’s picture

Status: Needs work » Postponed (maintainer needs more info)
TR’s picture

Status: Postponed (maintainer needs more info) » Postponed

I 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 ...

Dave Reid’s picture

The 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.

TR’s picture

Version: 7.x-2.x-dev » 8.x-3.x-dev
Status: Postponed » Active
Issue tags: +D8RE
TR’s picture

Project: Rules » Rules Essentials
Version: 8.x-3.x-dev » 8.x-1.x-dev
Component: Module Integrations » Code
Issue tags: -D8RE

Moving to D8RE.

TR’s picture

Status: Active » Needs review
FileSize
17.16 KB
TR’s picture

Removed 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.

TR’s picture

I will fix the 1 coding standard (unused use) on commit, not worth rolling another patch for it.

  • TR committed d83531c on 8.x-1.x
    Issue #2219023 by TR, Dave Reid: Add a rule condition and action to...
TR’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.