Skip to content

feat: Allow additional reset password params, introduce ForgotPasswordValidator - #3671

Merged
imorland merged 2 commits into
mainfrom
im/forgot-password-validator
Nov 7, 2022
Merged

feat: Allow additional reset password params, introduce ForgotPasswordValidator#3671
imorland merged 2 commits into
mainfrom
im/forgot-password-validator

Conversation

@imorland

@imorland imorland commented Nov 6, 2022

Copy link
Copy Markdown
Member

Related to #3670

Allows for 3rd party extensions to extend the functionality of the Forgot Password modal. ie Adding a captcha, etc.

Changes proposed in this pull request:
ForgotPasswordModal:

  • Extracts fields to an extendable function
  • Extract params into an extendable function so that additional params can be added
    ForgotPasswordController
  • Replaces the validator factory with a new ForgotPasswordValidator, with the same rule as existed previously
  • This can be extended by 3rd party extensions to add any additional rules, where required.

Reviewers should focus on:

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@imorland
imorland requested a review from a team as a code owner November 6, 2022 21:02
@imorland imorland added this to the 1.6 milestone Nov 6, 2022
@imorland imorland self-assigned this Nov 6, 2022

@luceos luceos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More extensibility 💪

@imorland
imorland merged commit 87cdb5b into main Nov 7, 2022
@imorland
imorland deleted the im/forgot-password-validator branch November 7, 2022 15:06
@luceos luceos mentioned this pull request Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants