Skip to content

Turn permission error into validation error for empty streams in event definition.#22778

Merged
janheise merged 8 commits intomasterfrom
fix/issue-10869-pt2
Jun 5, 2025
Merged

Turn permission error into validation error for empty streams in event definition.#22778
janheise merged 8 commits intomasterfrom
fix/issue-10869-pt2

Conversation

@dennisoelkers
Copy link
Copy Markdown
Member

@dennisoelkers dennisoelkers commented Jun 3, 2025

Note: This is based on #22771, which needs to be merged before.

Description

Motivation and Context

This PR is making sure that if a user is creating an event definition, does not have the global streams:read permission and has an empty streams field in the event definition config, a validation error will be returned instead of a 403. This way, the frontend can handle it and show the user a helpful message in the event definition creation dialog instead of ending up on an error page.

Fixes Graylog2/graylog-plugin-enterprise#10869.

/prd https://github.com/Graylog2/graylog-plugin-enterprise/pull/10970

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@dennisoelkers dennisoelkers requested a review from janheise June 3, 2025 12:35
@dennisoelkers dennisoelkers force-pushed the fix/issue-10869-pt2 branch from 943d580 to 66d7f99 Compare June 3, 2025 14:36
@janheise janheise merged commit a9d80b8 into master Jun 5, 2025
7 checks passed
@janheise janheise deleted the fix/issue-10869-pt2 branch June 5, 2025 08:48
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.

2 participants