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 validation for event_type_ids for outgoing webhooks #429

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gazayas
Copy link
Contributor

@gazayas gazayas commented Aug 17, 2023

Fixes #407.

I was able to confirm the fix provided in the issue works by ejecting the webhooks controller and customizing the valid event types.

What I did in the screenshots here:

  1. Ejected the webhooks controller and edited valid_event_types to only allow membership event types
  2. Check @endpoint.valid? yields true in the create action
  3. Temporarily add ALL event types to the record
  4. Ensure the record is invalid when ALL the event types have been added.

The record is also valid when the event types field is left blank.

Screenshot from 2023-08-17 21-46-40

Screenshot from 2023-08-17 21-46-06

@jagthedrummer
Copy link
Contributor

@andrewculver, I'm leaving this one for you since it affects outgoing webhooks.

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.

Webhooks::Outgoing::EndpointSupport doesn't enforce valid_event_types.
2 participants