feat(banlist): demo download, comment gates, and in-place comment composer - #29
Merged
Merged
Conversation
The drawer already had a download CTA; the public table still hid demos behind that extra click.
A generic web-admin session was enough to write S/P comments. Those records belong to the moderation queues.
Public comments must not open S/P editors. Those records belong to the queues and need the matching flags plus a live parent.
A bad filename must not leave an orphan ban, and getdemo must not follow a symlink out of the demo root.
Add and edit open the player drawer on banlist/commslist, or an inline composer on protest/submission cards. Delete removes the comment in place so pagination, scroll, and open disclosures survive. The public ?comment= page editor is gone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the security and demo-list pieces of upstream sbpp#1568, then replaces the public
?comment=page editor with composers that stay on the current view.Demo download
Comment and demo gates (from sbpp#1568)
bans.add_comment/bans.edit_commentfor submissions (S) and protests (P) require the matching BanSubmissions / BanProtests flags. A generic web admin can no longer write queue comments.?p=banlist&comment=never opens an S/P editor, even when public comments are on.getdemo.phpandbans.adddemo attach stay underSB_DEMOS. A bad filename cannot leave an orphan ban or follow a symlink out of the demo root.Comment composer (this follow-up; different from upstream)
Upstream sbpp#1568 still used a page-level
?comment=editor. We did not port that rewrite. Instead:Banlist / commslist Add or Edit
?p=banlist&comment=(or commslist). The list is replaced by a form. Scroll, page number, and open row state are lost.Protest / submission cards
Banlist / commslist / drawer Delete
message.redirreloaded the list (or remounted the drawer). Page 3, mid-page scroll, and an open disclosure all reset.<li>is removed in place. Pagination, scroll, open disclosure, and open drawer survive.Public
?comment=Mods chrome and dependency bumps from upstream sbpp#1568 stay out of this PR.
Test plan
banlist-comments-visibility.spec.ts(drawer compose, table patch on save, in-place table delete, in-place drawer delete)comment-delete-dispatcher.spec.ts(queue ctype P still confirms + calls the API)?p=banlistfor a row with a demo?comment=getdemo.phprejects symlink / path-escape filenames;bans.addrejects malformed or missing demo metadata before INSERT