Category-level restrictions now exist as a first-class tier between forum-scope and site-wide. A super-moderator of a category can issue a Suspend, Permanent Ban, or Shadow Ban that applies across every forum in that category — with one action rather than N forum-by-forum. Every category-scope action auto-escalates to Sysops at high priority (forum-scope is normal) for consideration of a matching site-wide action.
New schema
category_bans— mirror offorum_bans, keyed bycategory_id. Same three-shape semantics via(expires_at, is_shadow).- 9 new
mod_templatesrows withscope='category'(5 Suspend / 2 Ban / 2 Shadow).{{category_name}}placeholder interpolated at render time.
New models + enforcement
App\Models\CategoryBan— parallelsForumBan.isBannedFromForum()resolves the forum's parent category so bothForumController::createThreadand::storeReplycan gate posting with a single call.CategoryModerator::isSuperModForCategory()— the gate for category-scope actions. Admins (role ≥ 4) bypass; regular forum mods are explicitly excluded.- Scoped error copy: a user blocked by a category-level restriction sees "You are banned from posting in this forum because of a category-wide restriction" rather than the same message used for forum-level bans. Scope is always legible.
Routes
POST /category/{id}/suspend-userPOST /category/{id}/ban-userPOST /category/{id}/shadow-ban-userPOST /category/{id}/unban-user
UI
- Forum mod-log: new "Category-level restrictions" card at the top, visible to every viewer with mod access. Super-mods + admins also get three category-scope action panels below it. Regular forum mods see a locked-out hint explaining why they can't act.
- Category page: new Mod Tools button in the header (gated to super-mods + admins), routes to the first visible forum's mod-log where the category-scope panels render.
- Escalations dashboard: category-scope reports land with
priority='high'so they rise above routine forum-scope escalations.
Known follow-up
Shadow-ban visibility enforcement at post render. Columns + model are in place, the escalation path works, but the thread view still displays every post regardless of shadow-ban state. Until the post-fetch filter lands, Sysops can use the auto-escalation to promote a category or forum shadow ban to a site-wide is_shadow_banned (which is enforced).
. __ ____ ___ ____ _ _
/ /_| ___| / _ \___ \(_)___| |__
| '_ \___ \| | | |__) | / __| '_ \
| (_) |__) | |_| / __/| \__ \ | | |
\___/____/ \___/_____|_|___/_| |_|
D2sk - Sysop