Skip to content

Phase 5: moderation - #6

Merged
fiammybe merged 3 commits into
mainfrom
claude/project-thread-kfbxfw
Nov 4, 2026
Merged

fiammybe merged 3 commits into
mainfrom
claude/project-thread-kfbxfw

Conversation

@fiammybe

Copy link
Copy Markdown
Contributor

Summary

Front-end moderation, built on one ModerationService that holds all rules (so they are testable without a request).

  • moderate.php: lock/unlock, pin, feature, move, merge, split from a post onward, delete topic, approve waiting posts, suspend a member, handle a report; plus per-forum lists of waiting posts and open reports. Every action is a confirmation form followed by a POST with a security token.
  • report.php: members report a post; one open report per member and post; guests cannot report.
  • PermissionService: canModerate() and canReport(). Suspensions were already enforced for writing; reading stays possible. Moderators and webmasters cannot be suspended.
  • Counters of topics and forums are recounted after merge/split/move/approve, and topic_last_post_id is checked in tests.
  • Subscribers are notified when a waiting post is approved, not before.
  • Toolbar on the topic page, per-post links (report, split, suspend) and queue links on the forum page for moderators; English and Dutch strings.

Not included: restoring pruned topics from the archive stays an admin task.

Test plan

  • Lint, PHPStan level 6, 40 unit tests
  • 82 integration tests (12 new in ModerationTest) on MariaDB locally
  • Manual test on http://iforum.test by David

Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
@fiammybe
fiammybe added this pull request to stack #11 November 4, 2026 20:29
@fiammybe
fiammybe merged commit 3323468 into main Nov 4, 2026
7 checks passed
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