Skip to content

fix(demos): download link and remove button on ban edit page (#1464)#1469

Merged
rumblefrog merged 2 commits into
mainfrom
fix/1464-demo-download-and-remove
May 26, 2026
Merged

fix(demos): download link and remove button on ban edit page (#1464)#1469
rumblefrog merged 2 commits into
mainfrom
fix/1464-demo-download-and-remove

Conversation

@rumblefrog

Copy link
Copy Markdown
Member

Summary

Test plan

  • ./sbpp.sh test --filter='AdminEditBanDemoTest|BansTest::testRemoveDemo'
  • ./sbpp.sh test PermissionMatrixTest covers new action registration
  • ./sbpp.sh phpstan
  • ./sbpp.sh composer api-contract (regenerated api-contract.js)
  • Manual: edit an existing ban with a demo → filename links to download; Remove demo clears UI + DB row

Fixes #1464 (issues 1 and 2 only; reverse-proxy upload slowness / external URL linking remain out of scope)

Closes the first two gaps from #1464: uploaded demos now link to
getdemo.php for download, and admins can remove an attached demo via a
new bans.remove_demo JSON action with row-level edit permission checks.
Align edit-ban demo lookup with UPPER(demtype), mirror getdemo.php's
scandir guard before unlink, fail closed when file deletion fails, and
add a forbidden-path API test for admins without edit rights.
@rumblefrog
rumblefrog added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit a6dce0e May 26, 2026
6 checks passed
@rumblefrog
rumblefrog deleted the fix/1464-demo-download-and-remove branch May 26, 2026 17:23
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Demo system: no download link, no delete button, slow uploads through reverse proxies and no error feedback on oversized files

1 participant