Skip to content

fix(checklist): comentarios y fotos de un día cerrado solo los toca admin - #21

Merged
bpstack merged 1 commit into
claude/compassionate-planck-gh6aoffrom
opencode/fix-checklist
Oct 12, 2026
Merged

bpstack merged 1 commit into
claude/compassionate-planck-gh6aoffrom
opencode/fix-checklist

Conversation

@bpstack

@bpstack bpstack commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Cambios

  • En un día cerrado, borrar o cambiar comentarios y fotos queda solo para admin.

Por qué

Recepción podía alterar lo registrado en un día ya cerrado. Decidido el 2026-10-11.

- checklist-comments.repository.ts: findComment returns the author, the
  run and whether the run is closed; findAttachment also says if its run
  is closed; deleteComment only deletes.
- checklist-comments.service.ts: removeComment and removeAttachment answer
  deleted, not_found, forbidden or closed. On a closed day only admin
  deletes; the event is logged in the item's own run, not in today's.
- checklist-comments-controllers.ts: 404, 403 or 409 for each refusal.
- closed-day-deletes.test.ts: closed day, admin, author on an open day,
  unknown id.

Why: the author could delete comments and photos of a closed day,
rewriting its history, and the deletion was logged in today's run.
Decided on 2026-10-11: only admin deletes on a closed day. Checked with
curl against the local database: after closing the day, reception gets
409 and admin deletes the comment.
@bpstack
bpstack merged commit 15e5aa7 into claude/compassionate-planck-gh6aof Oct 12, 2026
4 checks passed
@vercel

vercel Bot commented Oct 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
four-points Ready Ready Preview Oct 12, 2026 6:54pm UTC

This branch was successfully deployed

1 active deployment
Preview — 2c0101fd Deployed Oct 12, 2026 by vercel[bot]
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.

1 participant