Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add filter:api.user.signup.requires-approval.result #6850

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

kontrollanten
Copy link
Contributor

Description

  • Deprecate POST /registrations/request endpoint and instead use POST /register for all type of registrations.
  • POST /register now returns 200 (previously 204) and always returns { state: { id: number, label: string } } (both for direct and request registrations). The state will tell the client whether it became a direct registration or not.
  • Add filter:api.user.signup.requires-approval.result.

Example:

  registerHook({
    target: 'filter:api.user.signup.requires-approval.result',
    handler: ({ requiresApproval, registrationReason }, { body, headers }) => {
      return {
        requiresApproval: true,
        registrationReason: 'Marked as spam'
      }
    }
  })

Related issues

closes #6691

Has this been tested?

  • 👍 yes, I added tests to the test suite

@kontrollanten kontrollanten force-pushed the feat-6691-req-approval branch from b1b8810 to f8259c5 Compare January 24, 2025 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin filter for altering signup require approval value
1 participant