Skip to content

Validate template group removal requests - #5358

Merged
TomJaeger merged 1 commit into
7.devfrom
fix/template-group-removal-validation
Jul 22, 2026
Merged

TomJaeger merged 1 commit into
7.devfrom
fix/template-group-removal-validation

Conversation

@TomJaeger

Copy link
Copy Markdown
Contributor

Summary

  • Require Template Group removal to use the expected POST request method.
  • Reject missing or malformed group identifiers before model lookup.
  • Add sanitized controller coverage for rejected and valid removal behavior.

Root cause

The removal controller relied on the Control Panel form shape without enforcing its request method or identifier requirements at the controller boundary.

Impact

Requests outside the intended removal flow are rejected before model lookup, while valid name- and ID-based Control Panel removals retain their existing site and permission checks.

Validation

  • Focused Group controller suite: 9 tests, 40 assertions
  • Current Design controller suite: 19 tests, 53 assertions
  • PHP syntax checks for both changed files
  • git diff --check
  • Independent review found no actionable issues

@TomJaeger
TomJaeger marked this pull request as ready for review July 22, 2026 14:58
@TomJaeger
TomJaeger merged commit bb31192 into 7.dev Jul 22, 2026
13 checks passed
@TomJaeger
TomJaeger deleted the fix/template-group-removal-validation branch July 22, 2026 14:58
@bryannielsen bryannielsen added this to the 7.5.26 milestone Jul 22, 2026
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