Skip to content
  • Carlos Antonio da Silva's avatar
    a3ae35e9
    Create a model hook around the lockable warden hook to reset attempts · a3ae35e9
    Carlos Antonio da Silva authored
    Resetting failed attempts after sign in happened inside a warden hook
    specific for the lockable module, but that was hidden inside the hook
    implementation and didn't allow any user customization.
    
    One such customization needed for example is to direct these updates to
    a write DB when using a multi-DB setup. With the logic hidden in the
    warden hook this wasn't possible, now that it's exposed in a model
    method much like trackable, we can override the model method to wrap it
    in a connection switch block for example, point to a write DB, and
    simply call `super`.
    
    Closes #5310
    Related to #5264 and #5133
    a3ae35e9
    Create a model hook around the lockable warden hook to reset attempts
    Carlos Antonio da Silva authored
    Resetting failed attempts after sign in happened inside a warden hook
    specific for the lockable module, but that was hidden inside the hook
    implementation and didn't allow any user customization.
    
    One such customization needed for example is to direct these updates to
    a write DB when using a multi-DB setup. With the logic hidden in the
    warden hook this wasn't possible, now that it's exposed in a model
    method much like trackable, we can override the model method to wrap it
    in a connection switch block for example, point to a write DB, and
    simply call `super`.
    
    Closes #5310
    Related to #5264 and #5133
Loading