Skip to content

Allow staff to edit and delete blocklist entries - #71

Merged
andrewstech merged 1 commit into
mainfrom
claude/staff-blocklist-edit
Nov 6, 2026
Merged

andrewstech merged 1 commit into
mainfrom
claude/staff-blocklist-edit

Conversation

@andrewstech

Copy link
Copy Markdown
Member

Summary

Staff could previously only add blocklist entries; editing and removing was admin-only. This gives staff full edit/delete access to any blocklist entry, including ones added by others.

  • Server (server/entity-routes.js): BlocklistEntry moves into STAFF_WRITABLE (same as AbuseReport). Regular users are still refused. PATCH requests now strip added_by so editing an entry can't rewrite who originally added it.
  • UI (BlocklistManager.jsx): staff and admins get edit (pencil) and delete buttons on each entry. Editing is inline — value, record type, reason, notes and regex toggle, with save/cancel. There was previously no edit UI at all, even for admins.
  • Copy: Staff Blocklist page description updated; new English strings added for the edit actions.
  • Tests (server/blocklist-permissions.test.js): replaced the "staff cannot edit or remove" test with tests that staff can edit/delete, regular users can't, and added_by can't be overwritten on edit.

Protected brands were already staff-editable, so no change there.

Testing

⚠️ Not run — dependencies couldn't be installed in the environment this was written in. Changed files pass syntax checks only. Please run node --test server/blocklist-permissions.test.js and npm run build before merging.


Generated by Claude Code

Staff could previously only add blocklist entries. They now have full
create/edit/delete access, matching abuse reports. Adds inline editing
to the blocklist manager for staff and admins, and prevents edits from
overwriting who originally added an entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194vp1Wt4B526Kes4zSsL4Q
@andrewstech
andrewstech merged commit f740163 into main Nov 6, 2026
2 checks passed
@andrewstech
andrewstech deleted the claude/staff-blocklist-edit branch November 6, 2026 14:44
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